An analogy for the atmosphere losing energy is how a car slows down when the gas/throttle is released. Friction between the tires and the road, wheel bearings and the hubs, etc. all generate heat. That loss of heat is loss of energy, leading to loss of velocity. Of course the car also slows down because of air resistance too.
BOP1 Re-post: https://www.youtube.com/watch?v=IWQDS-4MBFk&t=1s