Suspend an ideal spring vertically from a ceiling and attach an object to the other end and then slowly lower the object until the upward force exerted by the spring on the object balances the weight of the object. As a result the loss of gravitational potential energy equals twice the gain in elastic potential energy of the spring-object-Earth system. Why are these two quantities not equal?