Thermodynamics began as the study of heat machines like steam engines to increase their efficiency. The observation that the total energy of the machine remained constant gave the first law of thermodynamics, that energy is always conserved, and that energy always flows from hot to cold gave the second law, that energy always disperses. It followed that if our universe is a big machine, it will have a constant energy that constantly disperses.
The second law predicts that the energy of the universe will always disperse, to end up as maybe one atom per cubic light year, in a big freeze that will last forever, because:
“… eventually all these over densities will be ironed out and the Universe will be left featureless and lifeless forever, it seems” (Barrow, 2007), p191.
Yet according to big bang theory, our universe was once about the size of a tennis ball, that then expanded into what it is today, but this requires energy, just as blowing up a balloon cools the gas inside it, so our expanding universe must be cooling down. This cooling effect is illustrated by cosmic microwave background, which is early light that was once white hot but is now freezing cold. Space is still expanding, so every photon in the universe has a slightly longer wavelength today than it did yesterday, which means less energy. Expanding space is constantly taking the energy of light and not giving it back, so the total energy of our universe isn’t conserved.
Does this deny the principle of conservation of energy? Not necessarily, as if the universe isn’t a closed system, the laws of heat machines don’t apply. Our universe doesn’t conserve energy because it is expanding, so what is conserved?