No net force is experienced by the molecules in the bulk of liquid and are free to move within. But, a net inward pull is experienced by the molecules in the surface film. When the area of the free surface is increased, the molecules from bulk move to surface film against the inward pull and hence work has to be done to increase the area of free surface.
This work is stored in the form of potential energy. Therefore, work done to increase the area of the surface of liquid is in accordance with the law of conservation of energy.