The clown / fool in Shakespeare's plays used to wear a special gown called motley.
The fool in the play, indeed, personified as a comedian and most intelligent.
Shakespeare used to tell to the world his own views through the mouth of these character.