I suspect that the tension-relief of sarcasm used as a joke is mostly in the reassurance that other people 'get it', implying that they're group members with whom one can be relaxed. (The sarcasm doesn't even have to be about the unpleasant thing for it to work, though if it is, you get the added bonus of having your annoyance at the thing confirmed as understandable.)
For sarcasm that one would reasonably expect almost anyone to notice, I still think it's group-membership related, but the group is something very broad, like 'society'. It can also involve putting the target in a catch-22 situation, where they have to either ignore the sarcasm and let the sarcasm-user treat them as out-group, or acknowledge the sarcasm and acknowledge that they did, or had a hand in, something wrong. This is basically win-win for the sarcasm user. (There are other options, like calling the sarcasm-user on their sarcasm, but those are relatively hard to do on the fly, and they're usually considered fairly aggressive, so it's pretty unlikely that someone will try one.)
For sarcasm that one would reasonably expect almost anyone to notice, I still think it's group-membership related, but the group is something very broad, like 'society'.
It can be a way of saying "We're in the same boat together.", floating in a sea that may or may not be populated by an out-group.
I am beginning to suspect that it is surprisingly common for intelligent, competent adults to somehow make it through the world for a few decades while missing some ordinary skill, like mailing a physical letter, folding a fitted sheet, depositing a check, or reading a bus schedule. Since these tasks are often presented atomically - or, worse, embedded implicitly into other instructions - and it is often possible to get around the need for them, this ignorance is not self-correcting. One can Google "how to deposit a check" and similar phrases, but the sorts of instructions that crop up are often misleading, rely on entangled and potentially similarly-deficient knowledge to be understandable, or are not so much instructions as they are tips and tricks and warnings for people who already know the basic procedure. Asking other people is more effective because they can respond to requests for clarification (and physically pointing at stuff is useful too), but embarrassing, since lacking these skills as an adult is stigmatized. (They are rarely even considered skills by people who have had them for a while.)
This seems like a bad situation. And - if I am correct and gaps like these are common - then it is something of a collective action problem to handle gap-filling without undue social drama. Supposedly, we're good at collective action problems, us rationalists, right? So I propose a thread for the purpose here, with the stipulation that all replies to gap announcements are to be constructive attempts at conveying the relevant procedural knowledge. No asking "how did you manage to be X years old without knowing that?" - if the gap-haver wishes to volunteer the information, that is fine, but asking is to be considered poor form.
(And yes, I have one. It's this: how in the world do people go about the supposedly atomic action of investing in the stock market? Here I am, sitting at my computer, and suppose I want a share of Apple - there isn't a button that says "Buy Our Stock" on their website. There goes my one idea. Where do I go and what do I do there?)