In Nature, energy dissipates to unobservable degrees of freedom that cannot be modelled (except in a very simplified way). As a consequence, the free energy of a bounded system with constant boundary conditions loses free (i.e., in principle observable) energy until everything is lost that can be lost (which is constrained through the laws of physics, embodied in the form of a free energy function as a function of the state).

Thus the state of such a system will end up in a local minimizer of the free energy surface. Such a state is called a stable state if the probability of being excited by enough energy to reach another local minimizer is tiny enough, and a metastable state otherwise.

Thus in the end, stability is a consequence of the fact that the free energy is bounded below and states of sufficiently low free energy are confined to compact regions of the state space. (Systems where these conditions are not met are typically not stable.)