If the ship was not capable of facing pirates and being able to deal with them effectively- it should not have been traveling without other ships with that capability. Either way this is not good.
I think further up the thread someone posted that usually these are civilian-run ships. However, I agree that it should have had an escort if traveling through pirate-infested waters. You wouldn’t even need much of an escort with the small arms and small skiffs the Somalis are using.