What you're referring to are legal classifications that prevent discrimination in very specific circumstances such as when applying for a job. When someone decides to make fun of vegans they absolutely DO NOT think to themselves "is that a legally protected class? No? Okay, I'm in the clear." This reasoning is blatantly incorrect.
If this were the actual reason then why do people also discriminate against groups that are protected classes like women? The answer is because we aren't in a court. We are talking about social values, not legal ones. Despite how much of a fucking asshole it would make someone to be misogynistic in their daily life there is nothing preventing them from doing so other than the fear of being outcast by their peers. It only becomes illegal in very specific circumstances.
They aren't consciously going through a checklist in their head. But legal influences societal. Maybe in the past they made fun of someone's funny hat, got in trouble for it, got annoyed at a preachy vegan and now shits on vegans instead.
I'm vegan and i make fun of everyone who only eats food touched by a magician. I don't even understand how they compare. One is a choice the other ones got indoctrinated by people who vut their dicks for fun.