Countries enforce laws on people/organizations they don't have jurisdiction over all the time. Usually it ends up with the country not being able to do anything about it until the convicted is doing business in that country, has assets there or is stepping foot into it (in the case of organizations: when a representative goes to that country).
Having another countries court enforce a judgement is the exception, it usually only happens if there's a treaty to that effect (like with copyright law).
You're mixing up personal jurisdiction with legislative jurisdiction. There is a body of customary international law that concerns the appropriate scope for extraterritorial legislative jurisdiction. This is separate from personal jurisdiction, which is in some ways easier to establish. In the US, for example, you can get personal jurisdiction over any natural person, and sue them for any way they wronged you anywhere in the world, merely by serving them with process while they are physically present in the US. But if you sue someone in Alabama for something they did in France, the Alabama court is going to apply French law in most cases. (in most countries, there is also something like the common law doctrine of forum non conveniens that allows courts to dismiss cases that are better heard by a court elsewhere)
And it's simply not the case that foreign judgments are generally unenforceable. See the discussion here https://en.wikipedia.org/wiki/Enforcement_of_foreign_judgmen... . No treaty is necessary, though it certainly helps the person seeking enforcement if there is one.
Having another countries court enforce a judgement is the exception, it usually only happens if there's a treaty to that effect (like with copyright law).