Using Hooke's Law, we know that the force applied is proportional to the extension of the spring. Therefore by plotting a graph of force against extension, through the area under the curve we are able to calculate the elastic potential energy stored in the spring, i.e. the work done.
As there is a proportional relationship between force and extension, the triangular area, $\tfrac{1}{2}bh$, gives the $E_p$ stored as $\tfrac{1}{2}F\Delta L$.
Therefore this is different from normal energy transferred, force×distance. However how would one be able to derive this equation without using the area under the curve?