In the final monologue of The Breakfast Club, the John Hughes movie about five teenage archetypes facing detention on a Saturday morning, the students leave their teacher Mr. Vernon with a brief, triumphant essay:

We think you're crazy to make us write an essay telling you who we think we are. You see us as you want to see us... In the simplest terms, in the most convenient definitions. But what we found out is that each one of us is a brain...and an athlete … and a basket case … a princess … and a criminal. Does that answer your question?

[Cue Simple Minds’ “Don’t You (Forget About Me)”]

[Judd Nelson fist-pump freeze frame]

[Credits]

The triumphalism is a little weird, because it assigns to Mr. Vernon all the prejudices that the students had of each other just a few hours earlier. It was only by sharing the misery of a Saturday morning that the Brain, Athlete, Basket Case, Princess, and Criminal realized how much they had in common. Each member of his or her own stereotype had to be conscripted into an uncomfortable experience to become friends with somebody different.

The last scene of The Breakfast Club is not an obvious teaching moment for sociologists, but according to Daniel McFarland, the lead author of a new paper on high school cliques, it offers a perfect lesson in how cliques harden in some schools—and why they barely form in others. In short, the natural instinct for teenagers to separate themselves into clusters and hierarchies is weakened when schools force kids to partner with peers they wouldn't otherwise want to be around to see first-hand the benefits of unlikely friendships.

If you remember high school as an occasionally awkward series of confrontations between tribes of similar-grouping kids, this is a good sign that you...went to high school. Most high schools segregate by "type," whether it's age, class, ethnic background, or volume of face makeup. Some schools are ruled by cliques that are as hardened as castes. Others don't have the same razor-sharp divisions between nerds, goths, lax bros, and queen bees.

What's behind the difference between schools, if the instinct to be around similar people is universal? McFarland says it's not about the students. It's about the schools, themselves. The way high schools are designed—their size, their level of diversity, and the way they treat students—can either drive students to segregate based on things like household income and race, or force them to build relationships that are more about their high school life than their socioeconomic backgrounds.

In bigger high schools, students are exposed to a greater diversity of students, which might make you think they’d be more likely to form friendships across socioeconomic barriers. Instead, McFarland found that in these schools, students are more anxious about finding meaningful relationships, and they respond by seeking out familiar peers who offer security, support, and protection.

"Larger schools that offer more choice and variety are the most likely to form hierarchies and cliques and self-segregation,” said McFarland, a professor of education at Stanford Graduate School of Education. "In smaller schools, and in smaller classrooms, you force people to interact, and they are less hierarchical, less cliquish, and less self-segregated.”

McFarland and other researchers asked students to name their closest friends. Next, they studied the direction of these friendships to identify cliques (many people citing each other) and popularity rankings. Students were considered popular not only when lots of people pointed to them, but also when lots of people pointed to people who point to them. "That suggests a pecking order,” McFarland said.

School size wasn’t the only factor that affected cliques and hierarchies. Schools that grouped students by academics and created other ways to force kids with different backgrounds to cooperate (whether in clubs or on sports teams) were less ruled by segregation and hierarchy. "In classrooms with assigned seating, you’re forced to sit next to someone whom you wouldn’t otherwise interact, and that tends to break down the tendency to segregate by background,” McFarland said.

McFarland says his work could easily be misinterpreted as a criticism of big high schools and cliques. He told me assertively that he's not prepared to make a blanket statement about the ideal size of a school or classroom in America. "We don't know what size school is best for social development," he said. "I did okay in a big, homogeneous public high school in Kansas. A shy kid might do better in a small school in New York.” There are silver linings to cliques, as well, he acknowledged. “They can be supportive and protective," he said. "They can also be vicious. We all agree that if people sort on the basis of class or race, that’s not a good thing for a pluralist democracy."

Instead, McFarland’s biggest point isn’t about how we ought to organize our schools, but rather how organizations shape our behavior. Our preference for familiar people and ideas is deep-rooted, as are our anxieties about people who are different and our ambition for status within our community. But smaller schools, smaller classrooms, and forced interactions between students with different backgrounds make us different than big classes, big schools, and an unfettered freedom to pick friends by the first thing we can see about them. "There is nothing inevitable about the expression of tie-formation preferences, even when they seem to have a central developmental tendency,” the paper declares in its introduction.

That's a lot of syllables. More simply: People are social animals, but we’re also creatures of our environment. Our habitats shape our habits.