Their jokes about assigning gender to babies and to being transgender, dressing in drag, like all of it was a send-up.
Sure, they did punch down if you were a person who were in those groups, but the fact that it was large enough social event to be relevant enough to be a comedy skit on a television show or a movie seen by millions implies that there were some serious things going on back then that they could see and wanted to address.
What the hell was going on that put all of those things in their mind?
This is the most correct answer. English Theater, historically, had men playing the women’s parts. There’s a long, long tradition of it. So MP dressing in drag follwed the tradition, the viewer might find it both appropriate, and humorously anachronistic, along with MP’s exaggeration of the characters makes for great humor.