The entity to whom the bond was payed then pays for the ship’s salvage.
You don’t need every country to implement this. There can be bond havens just like there are tax havens. It’s not ideal but it’s still a huge improvement over making every country a haven. And anyway, there are lots of things a country can do to devalue havens, such as prohibiting businesses operating within said country from doing business via ships that are registered in these havens, including transitive. No system is perfect, but why would we reject imperfect solutions that still do a ton of good?