Having power and electricity is vital for ships to function at sea. It does not matter if it is a small yacht or a huge supertanker. They need energy to run and reach their destination safely. Hence, seafarers perform maintenance schedules for all the machinery and electrical systems on board. But...
https://www.seamanmemories.com/emergency-generator-on-ships/