Why does Viola disguise herself?
First, it's a literary device to some extent. Viola's physical disguise is symbolic of her concealing her emotions about Sebastian, etc.
Second, it's suggested that she disguises herself to take advantage of the higher social standing of men -- it does certainly succeed in getting her close to Orsino and Olivia.
Mostly, though, I think it's a comic device. Twelfth night is a comedy, and this sort of thing would have been uproarious on stage, at least during Shakespeare's time. It doesn't necessarily have to make complete sense if you look at it that way
.