system
Given the following post, respond as if you're commenting on Reddit:
human
How does spatial expansion cause photons to "lose" energy i.e. redshift?


My naive understanding:  
A photon is a an excitation in the EM field. So when space expands all its consituent fields expand, and this causes an excitation to be diffused over a larger area of the field. Ergo the wavelength is longer. But wavelength defines a photon's energy, so where did that energy go? Doesn't that violate the conservation of energy?

Why doesn't that cause electrons to redshift (or does it?), what about if the electron is trapped orbiting an atom - wouldn't it lose energy from the expansion of space?
gpt
Conservation of energy doesn't apply because the redshift is relative to a reference frame where you and the source are at rest, and energy doesn't need to be conserved between different reference frames.

The energy of a redshifted or blueshifted photon depends on how you make the measurement so you can't really compare them and say energy is lost or gained.