The rocky island of Märket lies in the Baltic Sea between Sweden and Finland. When the Finns put a lighthouse on it in 1885, they unwittingly put it on Swedish territory.
This created a problem: Without moving the lighthouse or altering the coastline, the parties had to find a way to reapportion the island equitably according to their agreement.
The solution was to draw a reverse S on the map: Sweden grants Finland the lighthouse, but it gains a corresponding incursion into Finnish territory, so the island’s balance is restored.
It must be tricky to play croquet, though.
Somewhat related: The Tehachapi Loop.