All things humourous fall into one or more of three and half categories.
1)The pun or play on words.
35)Gross positive or negative exageration.
6)The unexpected (which really fits into the above category.)
42)And things happening to other people that you are glad didn't happen to you! (Really starting out as a gasp of relief and then evolving into a method of tension diffusion.) Really serious injury seldom elicits sniggers.
Many of the examples on the programs you cite can be seen as "natural selection" still operating on humankind.