Final answer:
The light reaching us from some celestial objects is shifted towards the red or blue end of the spectrum due to the Doppler effect.
Step-by-step explanation:
The phenomenon of light shifting towards the red or blue end of the spectrum is known as the Doppler effect.
This effect occurs when the source of light is moving towards or away from the observer.
When an object is moving away from us, the light gets stretched, causing it to shift towards the red end of the spectrum, known as a redshift.
Conversely, when an object is moving towards us, the light gets compressed, causing it to shift towards the blue end of the spectrum, known as a blueshift.