A ship at sea moves in response to the waves it encounters; the ends move more than the centre. It followed that if a warship were to mount only a small number of guns, it would make sense to mount them centrally, where the movement of the ship was minimal.
The motion of a ship in the water is influenced by the waves it encounters, with the outer sections moving more than the central part. As a result, if a warship were equipped with only a limited number of guns, it would be logical to place them centrally, where the movement of the vessel is least affected.