Thermodynamic Equilibrium in the Expanding Universe