It seems like hiring trained personnel would be a better use of the ship owner's money than outfitting the ship itself. It's a more flexible option, since your defense is still functional even if the ship is boarded. It's expensive, to be sure, but no company wants to lose cargo and the lives of their employees - even if it's only for the sake of maintaining a healthy public image. That being said, the issue shouldn't have to be resolved by private companies. Global entities like the United Nations are supposed to be the ones addressing these issues through united action in defense of their citizens. I'm not saying that to express some form of desperate idealism - it's more an observation of the systemic failure of contemporary government to respect the rights and needs of honest people. I certainly feel that if government isn't willing to step up to solve the problem, they should step aside and let private contractors deal with it instead.
There are 27 navies from around the world engaged in anti-piracy operations in Somali waters, many of which form combined task forces and regularly share intelligence; since this is an "infringement of [Somalia's] sovereignty" they have the permission of the United Nations to carry out these operations. Many countries have also authorized shipping companies to use private security measures, and some security firms specialize in anti-piracy. So you do have government trying to fight piracy, and you do have the private sector trying to fight piracy.