US Law does not apply to Costa Rica-- it's outside their jurisdiction. That's one of the fundamental problems here.
The US could pass a law that Sainsburies (a UK grocery store, with no US locations) has to employ a jazz band at every one of their stores for 3 hours every friday afternoon... but it doesn't matter, because the US does not have jurisdiction over the UK. Even if a US citizen goes and visits and stops by a sainsbury and is upset at the lack of a jazz band.
The whole concept of jurisdiction & borders is an illusion. Any entity can apply any arbitrary law anywhere, provided they can enforce it. The reality is that the US is a superpower in terms of military, economics & political force. If the US really wants a jazz band at every store, the UK may be in a strong enough position to fight back, but Costa Rica would most likely have to employ that jazz band as it couldn't possibly withstand the will of the US.
As you've probably noticed, the US goes around the world and enforces its will all the time. Whether its via various asymmetrical treaties, direct military invasion or some other tactic, they usually at least move the needle towards the direction of their desire.
Which is not to say that the US is alone in these actions. There are lots of entities that enforce their will like this. Russia for example just recently went and took a nice chunk of land for itself in the form of Crimea. This was neither new nor surprising, especially for me as I was born in a Russian occupied territory.
There is no better illustration of this than the US eventually persuading Sweden to railroad The Pirate Bay, despite the fact that it was well-established that TPB was perfectly legal in Sweden.
As it stands today, there are some entities that are effectively more equal under the law because they have infinity money. One of the most important rules for a successful adult life is to never cross anyone with infinity money (unless you yourself also possess infinity money). Money talks.
And a large point of provisions like DMCA domain-name seizure is to allow the US to stop foreign businesses that don't comply with US law from being accessible to US citizens.
from what i understand, they were nailed for providing services to americans (citizens and corporations), and that falls under uncle sam's jurisdiction.
The problem is that telecom in general, but especially the internet, has made the old concepts of jurisdiction and borders, which were developed when people had to be in the same place at the same time to interact, really muddy.