If anything needs a military response, it is the piracy problem off the horn of Africa. Why don't ships traveling those routes have a squad of soldiers and some 50 caliber machine guns mounted on the decks?
Or even more curious: Why havn't some groups of mercenarys followed the pirates home, to steal their ransom money?