If anything, Sue and Sally are being a little clique-ish by rubbing their inside joke in Mary's face.
That's what I've been wanting to say but wasn't sure how to put it. I agree.
I can completely see this point of view, but I don't think it's always the case. For me, an inside joke isn't intended to keep someone out, it's intended to reinforce bonds/intimacy between people who know each other very well. I don't see anything wrong with that, provided that it's not happening constantly. I think it would rub me the wrong way because it's okay that two people have something not everyone is involved in, and I think that it shouldn't have to be avoided or hidden. I don't have to be a part of every inside joke and it seems to display insecurity or a need to be more intimate than perhaps the relationship actually is for Mary to "take over" the joke. If Mary was a close friend, she'd have her own inside jokes with the group. If she's not, then trying to force her way into an already established one is a little odd.
This is resting on the assumption that the in-jokes are not happening constantly and they're not so obscure as to leave Mary out of the conversation altogether. There is definitely a time and place for these kinds of things, and the inside-jokers ought to be aware of it. But I think people who are relative newcomers to a group of friends ought to be able to understand that things happened before they were there, and those things will sometimes be referenced in a joke, and not be either upset by that or try and usurp it.
While I agree that "inside jokes" are not bad and don't necessarily have to be hidden from the public...and while I understand that your point of view is based on the assumption that it's not done constantly, I do think that in general "inside" jokes need to be handled discreetly.
In the example given in the OP, Sue and Sally use "that's spicy" often enough that Mary notices and asks what it means. They tell her and she uses it too. I think it's unfair for them to say "Mary, that is a phrase only for Sue and Sally and you aren't 'in' enough to get to use it too." If they are so protective of that phrase, then they need to not use it so often. Mary isn't being rude. Socially awkward, maybe, but not rude.
DH and I have some code words for different things. They aren't necessarily jokes but they are only between he and I. We will use them in public when we want to communicate something just between us and/or share a private moment, but we don't make it obvious what we are doing. We don't announce "Hey we have an 'inside' thing going on and none of you are a part of it!"
So that being said, I think inside jokes are great. But, I do think it's kind of clique-y to make them so obvious. By definition, if it's an 'inside' joke, then someone is 'outside' the joke and pretty much like talking about a party in front of someone that isn't invited, this can come off rude. And I get that sometimes an inside joke will slip out that someone else asks about. I say, just tell them, as best as practicle, the story behind the joke. That's a nice way of letting them 'in'. And I would think if you don't continue to reference it, those that aren't meant to be a part won't have much opportunity to insert themselves in it uninvited.