How to explain path of light in different reference frame?

There is a standard diagram for deriving time dilation in special relativity. So say there's a ship in deep space with observer O' in inertial reference frame S' moving to the right with respect to an observer O in inertial reference frame S. In frame S', the path of light in his light clock is vertical whereas in frame S it follows a triangular path. I am not questioning that, so let's not go through that derivation here.

What I am questioning is how observer O explains the non-vertical path of light in his reference frame, on an intuitive level, given that the light source is pointing up for him also. For instance, if there were a ball thrown up at in S', observer O would explain its path in S by saying that before being tossed the ball had momentum to the right by virtue of being on the ship and it retains this momentum when only a vertical force is applied to toss it up. Something along those lines, to explain the light path.

Special relativity comes in because in the train example, O measures the bullet speed by the length of the diagonal of the vertical and horizontal velocities (so it appears greater than O' sees it) whereas with light both observers measure the light beam travelling at $$C$$. Since the $$C$$ is the same for O and O', other elements of the calculation have to change, but this is then just the time dilation question.