We can legislate all we want about making bullying against the law. But the truth is that we would have no bullying if we did not ship kids off to be isolated from the majority of adults for the majority of their days. Kids are much less likely to bully when they are intermingled with adults, in the real world.
People naturally categorize each other. We have been doing this forever, and it's good for the human race. Our internal drive to associate ourselves in a bigger group helped us last where the the relatively solitary neanderthals did not. We have developed ways to choose to be around smart people by subconsciously identifying visual cues—and this is why good looking people are also smarter. (Yes, really. Here's the research.)
So my point is that humans are masters of categorization. The drive to categorize and affiliate ourselves with different groups is a primal. So, of course the drive to exclude people is primal. If we don't exclude people then we cannot have a sense of belonging. If everyone belongs everywhere then we belong nowhere.
The thing that keeps kids in check is the adults around them. Throughout human history kids have been raised alongside adults and the adults have modeled for them how to act. Throughout human history the ratio of adults to kids has never been 1:30. In this case, you cannot model for the kid. The kids are teaching each other. They are isolated from examples of how adults live their daily lives.
This is a good time to tell you that I am a Lord of the Flies scholar. I realized, during my freshman year of college, that the most efficient way to write papers is to always write about Lord of the Flies. It worked because I impressed the non-literature professors, and there were many, that I brought in outside texts. Of course, I also brought in my own outside papers, that I altered and repurposed. But what I learned is that just about everything can be explained in terms of Lord of the Flies. And this is no exception: If you leave kids alone, with no adults, they start categorizing and affiliating and they are mean.
Bullying seems like a completely normal outcome of leaving kids to themselves at school. They have a natural tendency to categorize and affiliate. And there is no one modeling how to do that nicely. When you tell kids "you can't say you can't play" you disrupt their social development. They should not have to play with kids just because they are stored together on the same playground during lunch time.
A fundamental part of being human is choosing who to associate with. Kids bully as a way to say "you are not with me" and as a way to assert their own power in a society setting. It's not wrong to to that—it's wrong to do it in a crass way. But telling kids they can't do it at all won't work.
Of course, what will work, and what worked for thousands of years, is allowing kids to associate with adults during the daytime so that they learn appropriate social behavior.