Children are learning this stuff largely by trial and error. Adults have a responsibility to point them in the right direction.
Further, the idea that even adults act this way is pretty silly. It's masked by the fact that in the adult world, we have far more power to self-sort into groups we find acceptable. I am not aware of anybody who actually makes everybody else feel welcome, and that certainly includes even those who make a big show about how inclusive they are, which generally gives me a lot of statistical information about exactly which groups they're interested in excluding.
I didn't say it could be done easily or instantly. What I'm saying is that children bullying one another isn't just a problem for the children; it's a problem for the adults who those children are learning standards of acceptable behavior from.