I saw somewhere an article, though I unfortunately forget where exactly, about research noting that humor is also tied to social status. Jokes are funnier when told by a superior than someone below your own position.
As a personal observation, jokes are also more fun when there are lots of others who also laugh at them. They’re also a great way to break the tension in a group situation. Humor has a very important social function, though obviously it might also have a function like the one you’re describing, as “it’s a social glue” doesn’t explain why some things are funny and why others aren’t. (Though I do think the social function is much greater.)
I saw somewhere an article, though I unfortunately forget where exactly, about research noting that humor is also tied to social status. Jokes are funnier when told by a superior than someone below your own position.
As a personal observation, jokes are also more fun when there are lots of others who also laugh at them. They’re also a great way to break the tension in a group situation. Humor has a very important social function, though obviously it might also have a function like the one you’re describing, as “it’s a social glue” doesn’t explain why some things are funny and why others aren’t. (Though I do think the social function is much greater.)