>>11975229Because the government in question is poor, there's no other place to store it, and the ship's creditors want the ship itself moved so it can take another cargo or be scrapped. Situations like this is why warehouses exist and why ports are considered special zones with special jurisdiction.
It's the same if it was a truck trailer stuck at transfer terminal. If the trailer's owner decides they want the trailer back, they can order it unloaded if the original receiver skips payment or otherwise has an issue. Then the cargo just sits there accumulating fees until the receiver pays them and arranges for a new pickup or the shipment is terminated and the warehouse owner finds a new buyer or scraps/trashes it.