In fact, I remember seeing this right after I finished high school too. The Internet was always "Kids are so cruel to each other" and now I wonder to myself if this isn't just the culture you guys have built where you live.
Of course we had uniforms and nearly everyone came in on public buses unless they were rich or lived close to the rich kids.
It takes just a few bullies (or worse, criminals), who get a bunch of sycophants, to ruin the atmosphere. If you cannot remove them, nobody knows how to control it.
Middle schoolers are as cruel as any people, just less sophisticated, so it's much more obvious.
They form tribal social groups which fight, cut out people they dislike or judge, explicitly.
Trying to remove that bit is nearly impossible. They do respect teacher authority, so an oblivious enough teacher can think everything is fine - or they normalized deviance.
The level of bullying other describe here is not possible without enabling from adults. Likewise, seeing how it plays with my kid, teachers who cares and know what to do can really make difference in how kids treat each other.
I'm no psychologist so please take my input with a grain of salt.
My point is, kids aren't cruel in the sense that we use to refer to adults. They, instead, are socially inept, and can't fully grasp the consequence of their actions.
It's always helpful to keep Hanlon's razor in mind: assume stupidity before malice.
They don't develop a theory of self until they are 3 or 4 so they can't anticipate what your needs are and that they are different than their needs, but they will try to share what they like with you.
They can be cruel very intentionally fully knowing what is going on well before adolescence. You teach them not to.
A lot of this is simply a culture of poverty and CERTAINLY not developed by the kids suffering in it
My teachers weren't great. But for most kids you don't need teachers explicitly. You just need a safe classroom environment that values learning.