Generally, I find that if someone brings their own private food/drink to a gathering, it's because of their own issues, and not because they're trying to make a point to the hostess or be rude to anyone. Like my dad will sometimes bring his own drink when he comes to my place for lunch. Of course, 1) it's my dad, so pretty much as casual as it gets; but also 2) I know he's super-picky about what he drinks. For reasons I don't understand, he hates my tap water and would rather drink NOTHING than drink it. And since he doesn't know what else I might have on hand, he often brings his own small bottle of 7-Up or even bottled water. I think it's kind of funny, but I know it's totally on him and what makes him feel comfortable, and he's trying to be nice by not insisting I have XYZ on hand for him to drink at all times.
I think a LOT of people truly don't want to put a host out, and if they've got some quirk or dietary restriction or something, they'd rather just take care of it themselves. Like, I have food restrictions, so whenever I go to a gathering I always put a couple of meal bars in my purse. I eat what I can that the host has provided, and try to be all-around pleasant and so forth. Then later--maybe on the way home, or in the bathroom if I'm really hungry--I'll eat one of the meal bars. Always trying to be discreet and not let anyone else know I'm doing it. It's just a thousand times easier for me to do that, than to try and explain to someone else what I can and cannot eat. (It's not that my restrictions are really so confusing, it's just that it would involve cooking in a totally different way, and I wouldn't really know if the person had done it correctly or not until later, if I had a bad reaction.)
I'm sure there are people who bring a private snack/drink to a gathering as a way to be rude and comment on the host's abilities, but I can't think of any examples personally. And, if someone does do this, it's probably best to react as if they just need their own little security blanket, and not get upset with them, because that's exactly what they're going for.
Also, I'm not super-fond of the "share with the whole class" mentality. I mean, does anyone seriously show up with a single bottle of water, or to-go cup of coffee, and have other people expect them to share it with anyone, let alone everyone? Like, is that a fear people have? Because I don't think that's reasonable. You know, it'd be pretty weird if I went to a gathering and one person brought a single piece of pie, and proceeded to eat it by themselves in front of everyone. That would be strange. But I wouldn't be thinking, "They should have shared that single piece of pie with everyone!" I'd be thinking, "They should have left it at home, or eaten it later, or eaten it privately." Or more likely, "Wow, that was weird, I wonder what kind of issue they have." I mean, this isn't Survivor. Like with my meal bars, as I said I try to be discreet and no one ever knows I have one; but if something happened and people found out I had it, I would definitely NOT expect rational adults to demand that I share it with everyone. (Nor WOULD I share at a normal gathering with plentiful food, because these things are expensive! And they're an acquired taste...)