As an analogy, imagine closing the hole in the end of a bicycle pump while you're pulling on the other end: let go, and the end returns inside the pump.
The energy I expend building up the partial vacuum I can get back afterwards.