Once the ship is captured, it's held for ransom, the insurance company gets their negotiators to minimize the price, they eventually pay the negotiated ransom, and insurance rates go up.
If you're expecting someone to prevent piracy, you need to first run the financial cost/benefit analysis. How much would need to be spent on a military operation, and what's the return that would be seen from the country sending their military to rescue a private ship registered to a foreign country, staffed by foreign crew, with cargo destined for a foreign country?