The ship is moving.
The bow moves water out of the way when it moves forward and the stern vacates space which the water fills. So water is going away from the bow (positive pressure) but towards the stern (negative pressure).
When a ship travels, water moves from the front to the back — and this shifting the water creates pressure as the water moves (which is also where drag comes from).
If the water only has a narrow space to move, it has to move faster through that area, so the pressure is higher/lower. (Higher before where it bunches up on the bow, lower after where it rushes to fill behind the stern.)
If one side has more space than the other (eg, left has less space) the the water goes faster on that side and so the pressures on that side are more extreme (eg, pushing the left bow rightward and sucking the left stern leftward — turning the ship right).
That is, the normal front-to-back pressure can cause a twisting force if the flow isn’t balanced left-to-right. Because the side with less flow ends up with water bunching up at the front and not enough in the back.