According to John McPhee in his book on merchant seamen, "Looking for a Ship", the tradition is that there are no firearms on cargo ships other than perhaps a pistol that the captain keeps locked in a safe.
This was a requirement of insurance companies. Apparently in the past, mutiny and attempted mutiny were considered a danger.
I agree that mounting such a weapon on the ship would prove useful if there were always someone manning it, so that the gun itself would not be used against the crew. It would add three men to the crew. Since I do not run a shipping company, I think I will leave it up to those who have more experience to decide whether to arm merchant ships.
There is NO EVIDENCE that pirates prefer to board American ships, rather than those flying other flags. US flagged cargo ships are pretty rare, as US shipping companies prefer to use "monkey flag" registration (Panama, Liberia, Honduras). They do not seem to be particular, and base their choices on the prospects of getting paid and getting away with the money.
Kramer just likes to dump on President Obama.