This quote is saying that humor has always been closely connected to the customs and beliefs that were accepted by the people of a certain time period. For example, the Yellow Kid was a comic strip that was funny because it made fun of the Irish immigrants who moved to the United States and had a different culture and customs than the people already living in the country. The comic was funny because the Irish were different, and humor often comes from making fun of differences.