I think it has to do with low self esteem or a desire to fit in somewhere. Even if the person doesn't recognize it. Or it could be a superior, "I'm better than all of you and gonna let you know it in every way I can" attitude.
I see it in children all of the time. Kids who don't fit in will join these "mean" crowds because they can be mean and nasty, it makes them feel good, and they are affirmed by the crowd and that makes them feel better.
They may have tried to fit in with other crowds and there is just something that doesn't work for them, or they are ignored or made to feel stupid.
There is something about these kinds of kids where they feel way too good about being mean to others. It fills a need for something they lack.
Because what good reason could there be to bully others? And why would anyone feel good about being mean?
Sad really.
ETA, you have a good point about the "If I join the crowd, they won't pick on me" attitude.