The wiki of Carlos Rodrigo

Shakespearean fools

Shakespearean fools are usually clever peasants or commoners that use their wits to outdo people of higher social standing. In this sense, they are very similar to the real fools, and jesters of the time, but their characteristics are greatly heightened for theatrical effect. The ┬źgroundlings┬╗ (theatre-goers who were too poor to pay for seats and thus stood on the ‘ground’ in the front by the stage) that frequented the Globe Theatre were more likely to be drawn to these Shakespearean fools. However they were also favoured by the nobility.

https://en.wikipedia.org/wiki/Shakespearean_fool