Why does the wavelength of the wave change when source is moving but not when listener moves?
Let's take sound as an example. If the source is moving towards you, the maxima of the waves follow each other more rapidly compared to a stationary source. If a puls is sent every T seconds (so T is the period), then for a stationary source the distance between two succesive pulses is simply vT, where v is the velocity of the wave. If the source moves with speed u in your direction the distance between pulses is vT-uT=(v-u)T. So the wavelength is shorter. Likewise, when the source moves away from you it becomes longer.
As you can probably easily see, if the source moves at the speed of sound, all wavemaxima coincide and the wavelength is zero.
The above description is correct for sound, since there is a medium. For em (light, etc.), only relative (source and receiver) motion counts and a Doppler shift will occur if either is moving.
Separate names with a comma.