I cannot for the life of me understand panto. My accountant is a cross dresser and he is in no way humorous, probably the driest person I have ever met.
It's not so much about cross-dressing being humourous (after all, in Shakespeare's time, women weren't allowed to act in the theatre, so young boys played the female roles), it's just more that it's one part of the whole tradition of pantomime.
Pantomime tells the story of a traditional fairy tale while also incorporating catchphrases, slapstick comedy, dancing, modern pop culture references and most importantly, audience participation.
The main roles are usually played by either sex, but traditionally, the principal boy or girl is played by a woman, as is their love interest; while the hero's mother (Panto Dame) is played by a man. But the gender swapping doesn't really have any significance other than that it's the tradition of pantomime... most people are more interested in the celebrity guests playing these roles, and the fun of attending the pantomime, than the fact that they are cross-dressing.
Even as I write this, I have the phrases 'He's behind you!' and 'Oh, yes he is!' running through my head... and I haven't been to a panto in years

!