Firstly, it allows the use of solar panels, as it can store energy during the day when the vessel is not moving, also it is beneficial to have an unlimited supply of energy out at sea, as diesel may run out.
Secondly, if the speed of the vessel does not match the most efficient range of diesel generator’s output efficiency, energy surplus or deficit is balanced by the battery.