Dear sarmista
Every compound tend to stay in lowest energy possible to be more stable, the less the energy it has the more its stable.
During formation the more energy it gives out , lesser becomes its own energy, hence more is the stability of compound.
PLEASE APPROVE THE ANSWER...!!!