In Tristram Shandy, everyone—including Tristram—is one step away from joining the Mad Hatter's tea party. Serious subjects are always one step away from being the subject of ridicule, and Tristram ridicules just about everything. But he's not unkind. Foolishness is a prerogative of being human. It's one of the things that everyone, from servant to master, has in common. Everyone has a subject they're foolish about, and foolishness let people laugh. Mirth, according to Yorick and one of the novel's epigraphs, is one of the main reasons to get out of bed in the morning. If you can't make or take a joke, you're not much good as a person.
In Tristram Shandy, knowledge leads to foolishness rather than wisdom.
Yorick's attitude toward foolishness is evidence that there's something holy about fools.