There’s something about this line that calls to mind some of the exchanges in Twelfth Night – Viola talking about her father’s daughter who loved a man, for example – or Feste splitting hairs with language. There is a rhythm to this kind of comedy. This moment links back to Hamlet toying with Rosencrantz and Guildenstern earlier, when “man delights not me.”
It all just has comedy rhythm and it is fun to play with gender in comedy.