We actually get that behavior a lot with parrots. Galahs mostly, but also Corellas and Cockatoos. It is most common to see Galahs hand upside down when there is a light rain, with their wings open and giving their armpits a wash. But not always. Once we caught a Cockatoo spinning three or four times around on a wire like some sort of trapeze artist while another pair looked on, including at one point holding on with a single foot. There seemed to be no reason apart from showing off. I believe that the main reason people think that swans occasionally fly upside down is also just to show off, for shits and giggles.
https://duckduckgo.com/?q=galah+upside+down&t=ffab&iax=image...