In the long history of humankind (and animal kind, too) those who learned to collaborate and improvise most effectively have prevailed.
So we used to look for funny songs, and learn them and play them. And we used to play them in pubs.