My mother told me that when she was a child there was at one time a fad for telling "jokes" that were not actually jokes - the punchline was just nonsense. When someone laighed at the punchline, because they thought they were supposed to laugh, the joke was on them, because there was actually nothing to laugh at, and they had made themselves look foolish.
Monty Python's Oscar Wilde sketch was on the same theme. People were splitting their sides laughing at things he said, even though they were only mildly funny or even not funny at all, simply because it was Oscar saying them - and also because they were in the presence of the Prince of Wales, who was a fan of Oscar's.