Check out the two articles below:
- Meyer, J. C. (2000). Humor as a double-edged sword: Four functions of humor in communication. Communication Theory.
Two of the functions unite communicators through identification and clarification of norms, while two other functions divide communicators through differentiation of unacceptable behaviors and enforcement of norms. "Inside jokes" unite communicators.
- Flamson, T., & Barrett, H. C. (2008). The encryption theory of humor: A knowledge-based mechanism of honest signaling. Journal of Evolutionary Psychology, 6 (4), 261–281.
They posited that humor acts as a high-accuracy signal of shared but tacit background knowledge, including social norms. To “get” a joke requires understanding tacit knowledge assumed by the joker, and “getting” a joke virtually guarantees shared tacit knowledge. "Inside jokes" signal you're on the inside.