If the shell keeps pointing in the same direction as the trajectory curves downward from that direction, the air will be hiting the shell from below. The effective total force acts a point called the centre of pressure, which (by the design of the shell) is infront of the centre of mass. The air therefore exerts a torque on the shell that tries to make it flip over on its back. However the shell is spinnning and so the torque instead makes it gyroscopically precess so that turns sideways instead. Indeed, after some oscillation just after it leaves the gun, friction will cause the shell to settle down with its nose pointing a little bit to the right (or left depending on the direction of spin) of the trajectory so that the precession causes the nose to turn downwards at a rate that is just that required to keep pinting close to the direction of travel.
The slight sideways yaw causes a sideways force that makes the shell deviate a bit from the path expected from how the gun was aimed. This is called drift, and has to be taken into acount when aiming the gun. (This drift has nothing to do with the coriolis force due to the earth's rotation). The drift is roughly proportional to the tangent of the angle of departure from the gun.