This question already has an answer here:
When traveling through the vacuum, electromagnetic waves experience an increase of wavelength (redshift).
According to this equation:
( Where, as we know, h is the Plank constant, c is the light speed, λ is the wavelenght and ν is the frequency of the wave. )
An increment of the wavelength implies a decrement of the energy of the photon.
The question is, where does that energy go? Is it consumed during millions of years of movement of the EM or is there another explanation?