I've read that they (the navies) are reluctant about adding firepower, because the pirates would so the same (or "natural selection" would mean the knife-wielding pirates will stay home and only the AK-47 and RPG-wielding ones will continue), which will mean all the ships would need defending against powerful pirates.
It's a bit like policing in the US.
A sister comment to yours has a saner opinion, I'd add why not fight the African poverty/corruption that cause these people to attack ships.