A free electron doesn't spin around a nucleus, but as soon as it hops back into a covalent shell.... it starts its blurry little cloud dance.
Where does that energy come from?
I know when it's excited into another level & drops, it emits a photon, but what about when it's completely pulled out?