In physics and thermodynamics, the ergodic hypothesis1 says that, over long periods of time, the time spent by a system in some region of the phase space of microstates with the same energy is proportional to the volume of this region, i.e., that all accessible microstates are equiprobable over a long period of time.
So if I understood it right, given enough time the system will move through all possible states. However, from thermodynamics we know that state of equilibrium is in a sense the "final state" in which system will get once and won't move to other states after that.
Aren't these two things in contradiction? If ergodic hypothesis is true then wouldn't that mean that system which is already in state of equilibrium will spontaneously move out of equilibrium into some other state (after enough time has passed)?