This seems like one of those problems that arise when we let rich people and corporations arbitrage for the lowest possible legal consequences, in this case flags of convenience that have no standards.
There is always some poor or corrupt country willing to ignore consequences as long as they can make a buck. The profits are private, but costs and consequences always laid onto the public. Miserable way to run things.