Answer:
Because steel is a ferromagnetic substance.
Step-by-step explanation:
A ship is build from number of plates joined together as a group of panels and block by welding.
A huge amount of welding is done for the construction of ships. During this a high ampere of current is required. As steel is a ferromagnetic substance, it has magnetic dipoles which tends to acquire magnetic behavior once being passed through electric current.
Hence when huge amount of current is passed through steel plates for the formation of ship, it becomes magnetized.