Nothing prevents a shipping company from saying "In order to take a job on my private ship, you are barred from bringing weapons on-board."
Nothing prevents a country from saying "If your merchant vessel desires access to our ports, it shall not be armed."
The combination of those two (effects, not necessarily codified policies or laws) means that merchant vessels aren't armed.
Nothing prevents a shipping company from saying "In order to take a job on my private ship, you are barred from bringing weapons on-board."
Nothing prevents a country from saying "If your merchant vessel desires access to our ports, it shall not be armed."
The combination of those two (effects, not necessarily codified policies or laws) means that merchant vessels aren't armed.