A British maritime law expert was being interviewed about this way back last year, and he said, "Well, there's a name for armed people on ships who fire on other sailors - they're called 'pirates.'" Legal liability could be a problem for some companies, but mostly they just build the cost of paying ransom into their business model.
Now, in the case of a tanker ship, they have to be extremely careful about flammable materials and it would be suicidal to fire a weapon from the stern. So just wrapping rails in razorwire is a pretty good defense, as are water cannons. Personally, I'm all for sinking every pirate ship we find, but there are logical answers regarding why up to know there has been great reticence to arm sailors. Instead, security services are offering armed guards which solves some problems.