I have never read "As You Like It," nor even heard it described. I just listened to the Great Books podcast on it and was amused.
In the Elizabethan theater, women's roles were already being played by boys.
The comic value of a woman disguising herself as a man was known well before the time of Shakespeare. Back to Aristophanes at least once, and persisted after as well. I acted in a lab theater production of an 18th C comedy and was cornered at swordpoint by a woman pretending to be her brother, arrived from a distance to defend his sister's honor against an older man trying to blackmail her into marriage. Adventurous girls very much liked those roles, and I imagine still do.
So when Rosalind goes into the Forest or Arden disguised as a male, Ganymede, we already have a boy-playing-a-young-woman-playing-a-young man. Not unheard of, but pushing our luck a bit. Shakespeare decides he is going one better, and when Rosalind, disguised as Ganymede, meets her true love Orlando in the forest - he of course doesn't recognise her...they never do in these plays - she/he helps him by letting him practice his courtship conversation on him as if he were Rosalind. Which of course, he is Rosalind. Being played by a boy. Those who got the joke at the Globe Theater proabably thought it was all very clever, but those who weren't paying close attention might have been asking their friends what exactly was happening.
If you aren't confused yet, there is also Phebe, who falls in love with Ganymede, who does not encourage this. She is imploring, and near the end of the play "he" agrees to marry her if he turns out to be a man, but if he turns out to be a woman, she must marry Sylvius. Phebe must not be too quick on the uptake here, or is so smitten she will agree to anything, and she agrees. I think most of us would be a touch suspicious at that point.