When the ship is constructed it will be surveyed & certified by classification society. Once certified there can't be any modifications which may lead to unseaworthyness.
Everyone wants the ship to be more safer since everyone's life is at risk when the vessel passing the pirate area. Ship staff help the guards to keep the piracy watch