in case of HF more energy is released, and for anything to be stable it wants to release as much energy as possible, then why is HCl more stable
Heat of formation may be positive or negative.
If ΔH is positive it is exothermic.
If ΔH is negative it is endothermic.
Stability of exothermic compound is more than that of endothermic compound, therefore greater the liberated energy greater is the stability.
Here, Enthalpy of formation of HF is -161kj and HCl is -92kj
You have rated this answer /10