Much like the U.S. attacked Cambodia to cut off supply lines to the Viet Cong.
Attacking the enemy's supply lines (even while that supply line is outside enemy territory) is a standard practice in war.
Germany said they’d curtail the use of U-Boats; the US’s contention was freedom of the seas which Germany agreed to, then reneged.