Equilibrium Price is established only when D = S Because, if demand (D) and supply (S) are not equal, there would be either excess demand (D > S) or excess supply (S > D).
In case there is excess demand, market price will tend to rise. Consequently, there will be extension of supply and contraction of demand.
The process of extension and contraction would continue till market clears itself S = D and equilibrium price is established. Similarly, if there is excess supply, market price will tend to fall, leading to extension of demand and contraction of supply.
The process of extension and contraction would continue till market clears itself: S = D and equilibrium price is established.