This could be because, Malvolio portrays himself as a puritan, and at the time the play was written Puritans had a clear disapproval of the theatre and had many attempts to try to close them. Malvolio does not call himself a Puritan, but it is shown by his demeanour and actions such as his opinions on Feste the Jester. Malvolio does not find Feste humorous and also believes that he has no wit. Malvolio even goes as far as to say “I marvel your ladyship takes delight in such a barren rascal…I protest that these wise men, that crow so at these set of kind of fools, no better than the fools’ zanies.” This is something that is quite disrespectful to say to his mistress, as he is nothing but a servant. This quote does show how this could be considered a trait of Puritanism, as he does not like the jokes and songs Feste sings. Shakespeare could have portrayed Malvolio in such a way to mock other Puritans, which is evidence for Malvolio being a legitimate comic target.
On the other hand, Malvolio is made to look foolish in such a way by Maria and Sir Toby that even the audience feels uncomfortable watching him. The audience can empathise with Malvolio people may have been made to look socially foolish, it's something that we instinctually feel pity for another