There are many theories behind the origin of the ‘Banana Peel’ joke made popular by the slapstick comedy films of the early 20th century. One hypothesis is that banana peels were representative of the pollution in New York City circa the turn of the 20th century. Public campaigns highlighted the danger of leaving banana peels on the ground (as well as other trash), but particularly the banana due to its highly visible color. The campaign against errant banana peels eventually led to the widespread use of municipal garbage facilities. A different theory is that the banana peel was a specific euphemism for dog feces – it was originally noticed that there was lots of dog waste on the streets, and people slipped in it, which is funny. But it is not a particularly practical device when used on stage, especially for family audiences, so they were replaced by banana skins, which are family safe, even though they’re not quite as slippery as turds, and certainly less abundant.
Origins of these theories are still trying to be sourced.