Here's why:
* The Doppler effect describes the change in frequency (and therefore wavelength) of a wave as the source and observer move relative to each other.
* Radial velocity is the velocity of an object directly towards or away from the observer. This is the component of velocity that causes the Doppler shift.
* Transverse velocity is the velocity of an object perpendicular to the line of sight.
Since the star is moving at right angles, its motion is purely transverse. This means there is no radial velocity component, and therefore no Doppler shift in the spectrum.
In other words:
* If a star is moving towards or away from us, we observe a shift in its spectral lines (blue shift for approaching, red shift for receding).
* If a star is moving across our line of sight, its light will not be shifted, even though the star is moving.