Kids can be cruel, there's no disputing that. Even if you do your best to teach them well when they're young there is always situations where they come up against those who come from, let's say less than compassionate homes. At a time when when "fitting in" is important to youngsters it's easy for charismatic, but nonetheless poorly raised shitheads to amass a few "soldiers" which just makes things worse.
Kids haven’t learned to have a ‘governor’ on their prejudices about any difference (whatever that difference happens to be, even if it’s an imagined difference), and some hadn’t developed empathy (and some never do even as adults). It comes to most at different ages & stages, but it’s ugly before that Governor & Empathy develop in the majority.
Then add in the ‘people’s behaviour in crowds’ thing (as adults it’s considered a crowd mentality but it’s freaky) even if the crowd is smaller with kids usually it is.
We all watched the riots after George Floyd, or BLM, or Defund the Police, or after soccer games, or that pack of losers in Vancouver a handful of years back over the Stanley Cup. Think most of them would behave that way outside of a crowd? Some would but I’m sure most wouldn’t.
Schools & playgrounds are a microcosm of the rest of the world without life experience that most of us gain before and into adulthood.
I think (and please feel free to correct me here) part of what we’re seeing today outside of the ‘social media’ thing with todays bullying is that families have gotten smaller. Back when you had 7 or 8 siblings, the older ones helped bully’s develop empathy (& to understand that there where real and immediate consequences to their actions).