Imagine standing outside your home as a loved one gets into a car and begins driving away. You continue waving even after the vehicle turns the corner and disappears from sight. Or perhaps you've ended a video call, watched the screen go black, and only then realised you were still smiling and waving at your laptop.
Logically, the gesture no longer serves a purpose. No one is there to see it. Yet millions of people do it instinctively.