STATE COLLEGE, Pa.—Last night I witnessed the aftermath of the brief, angry riot at Penn State: an overturned news van being righted by a bulldozer, debris from battered cars and upended trash cans littering the street, college kids in “Joe Knows Football” t-shirts stumbling away from College Avenue with pepper sprayed red eyes and tear-stained faces, courtesy of the police. The students had reacted violently to the 10 p.m. announcement from the university's board of trustees that Joe Paterno, their beloved football coach, was fired.

As the rioters vented their rage and grief, commentators and bloggers around the world began lambasting the students for defending a man who knew about an allegedly horrific case of child abuse and did very little to try to stop it. But for these students, turning on Paterno may not be a simple matter of recognizing his moral error and reevaluating their reverence for him. Psychologists have long studied the mentality of group membership, and their research helps explain why all of us have a tendency to stick up for our idols and leaders even in the face of serious wrongdoing.

According to psychological theory, every person has a social identity, which depends on being a member of various groups. “The social groups you belong to become a part of the very essence of who you feel you are,” explains psychologist Adam Galinsky, a professor at the Kellogg School of Management at Northwestern University. These groups can include our families and circles of friends; the clubs, churches and schools we attend; our race, ethnicity and nationality; and the list goes on. The more strongly we identify with a particular group, the more vehemently we defend its members and ideals—a trait that experts think evolved along with early human society. Banding together and protecting one another allowed our ancestors to survive, and so to this day we are quick to cheer on our comrades and feel animosity toward rival groups. Many scientists think this in-group psychology explains prejudice, racism and even sports fandom.

Most of the Penn State students who rioted Wednesday night have social identities that are built around a lifelong allegiance to the school. If you attend Penn State, Galinsky explains, “Penn State is you, it’s part of you, it’s such an important thing.” And nothing symbolizes Penn State more than Joe Paterno, head football coach for 46 years. Many of these distraught young adults chose to attend the university because of their love for the Paterno’s team—not the other way around. And they rioted because “the person that symbolized the school they go to, that’s given the school stature, that’s made their own selves have meaning and purpose, has now been taken away from them in an aggressive and sullied way,” Galinsky explains.

The pros and cons of such an extreme allegiance to a sports team are a ripe topic for debate—especially in the wake of this scandal, in which it seems the needs of the football program trumped the moral imperative of the university’s leadership. But setting that aside for now, the fact remains that these particular students do have an incredibly strong identity as Nittany Lions—and recognizing that identity can help us understand their behavior. Their actions during the riot were systematic and easily explained from a social identity perspective, Galinsky points out. “It’s understandable why they turned over the media bus,” he says. “For them, this whole thing is being driven by the media. If it wasn’t for the media talking about the scandal 24/7, Joe Paterno wouldn’t have been forced out.”

But what about the children who were allegedly harmed by former assistant coach Jerry Sandusky under Paterno’s watch? Uneasy jokes are flying today about the “pro-pedophilia rally” in State College last night—but Galinsky points out that the people accusing the students of not caring about the victims are missing the big picture. “Our interpretation of facts are incredibly clouded by our own perspective,” he says. The students recognize Paterno’s mistakes, as evidenced by their many statements to the press, but being so involved in the Penn State community, they do not judge his mistakes as harshly as outsiders do.

And leaders in general are hard to indict, especially those like JoPa who have near-mythical stature. The idea that a living person can be deified is not surprising from an evolutionary point of view. A crucial component of the social cohesion that allowed our human ancestors to survive was religion, explains Freek Vermeulen, associate professor of strategy and entrepreneurship at the London Business School. Religion “centers on myths and deities,” he wrote. “This inclination for worship very likely became embedded into our genetic system, and it is yearning to come out and be satisfied, and great people such as Jack Welch, Steve Jobs, and Lady Di serve to fulfill this need.”

Joe Paterno is both a deified leader and the living symbol of Penn State, inextricably bound up with the identity of the students who reacted so emotionally last night. In that light, it makes more sense that they took to the streets. Although the vandalism cannot be justified, if we recognize the root of the students’ feelings it may help us reconcile their loyalty to Paterno—inconceivable to many outside the Penn State community—with the disturbing story of child molestation that has been revealed over the last several days. “Don’t judge them harshly,” Galinsky says. “If you were a member of that community with that identity, you would have had the same reaction.”