For planets and moons, equilibrium is reached when the gravitational compression is balanced by a pressure gradient. This pressure gradient is in the opposite direction due to the strength of the material, at which point gravitational compression ceases.