For millennia, teenagers were included in complex parts of society, with kids of different ages, and some adults around. They could learn, they could teach, the could choose authority figures to imitate.
In a modern school, though, they are isolated for most of their day in a group of 20-30 kids of same age. They can't build a natural hierarchy around experience and abilities, for a wide enough gamut is not available. So they end up building a hierarchy based mostly on aggression and persuasion. It of course ends up pretty toxic.