The biggest problem with arming the merchant ships (and also the reason the whole criminal racket has prospered) is that the owners don't WANT them armed or resisting for fear of being sued if one of the crew gets killed, maimed or injured resisting. There is some pretty contradictory information about this circulating, but apparently it is not so much outright illegal across the board at all, but instead depends on what ports of call the ship will make on the route, the law of its flagging country, and more than anything else on company policy.