It's a "gidday" - sort of like the small wave when passing by an oncoming vehicle on a country road. Probably meant a lot more in the "old" days when there weren't so many aeroplanes in the sky and passing someone else was a novelty.
Of course now that I know how much it annoys people, I'm going to be a 500 knot, 30000 feet high Las Vegas
(and I'll do it in the sim too - just to be consistent)