Remember that Twelfth Night (all Shakespeare comedies, really) works toward a "tidy" ending where social order is restored and couples are paired off into heterosexual twosies so they can make lots of babies and live happily ever after? Well, after Viola says, "Surprise, everybody! I'm not really 'Cesario,' I'm a girl!", Shakespeare leaves Viola in her man-pants.Also, even after Duke Orsino and Viola get engaged Orsino still calls Viola "boy" and "Cesario".
Boy, thou hast said to me a thousand times
Thou never shouldst love woman like to me.
Give me thy hand;
And let me see thee in thy woman's weeds. (5.1.25)
OK, clearly Duke Orsino needs some time to adjust to the fact that his trusty "boy" servant, who has been going on and on about how much "he" loves the Duke, is really Viola. This is probably why he calls Viola "boy" and is so anxious to see his soon to be bride in her girl clothes.
Problem is, the sea captain is holding Viola's dress for her and darn it all if that rascally Malvolio isn't keeping the sea captain prisoner. We have no idea why. Maybe Malvolio caught the captain having fun or something. The point is that it's an awfully convenient way for Shakespeare to keep his leading lady dressed like a boy on stage. (Fun fact: Viola is the only Shakespeare heroine who never changes out of her man disguise.)
So what? Well, I think this is a pretty cool way for Shakespeare to…