The energy of a system is its capacity to do work. When work is done on an otherwise
isolated system (for instance, by compressing a gas or winding a spring), the capacity
of the system to do work is increased; in other words, the energy of the system
is increased. When the system does work (when the piston moves out or the spring
unwinds), the energy of the system is reduced and it can do less work than before.