1. I wrote my PhD dissertation on the social function of humor (in literature & film) and here's the thing about "just joking."
2. You're never "just joking." Nobody is ever "just joking." Humor is a social act that performs a social function (always).
3. To say humor is social act is to say it is always in social context; we don't joke alone. Humor is a way we relate/interact with others.
4. Which is to say, humor is a way we construct identity - who we are in relation to others. We use humor to form groups...
5. ...and to find our individual place in or out of those groups. In short, joking/humor is one tool by which we assimilate or alienate.