The natural world seems intent on synchronizing. Schools of fish, flocks of birds, herds of wildebeest, and swarms of fireflies all effortlessly coordinate their actions with one another. A recent study published by Scott Wiltermuth and Chip Heath of Stanford University in the journal Psychological Science, suggests that humans are no different. In fact, our ability to synchronize might be one of the most important developments in our evolution as a social species, a skill we need to successfully choreograph our dance moves at parties—and also, perhaps, to live together in stable, cooperative societies.

Examples of the power of human synchrony abound—from the awe-inspiring opening ceremony of the 2008 Summer Olympics to the fear-inspiring Nazi military march, to the ridiculous communal dances in which we find ourselves at weddings. Who hasn’t bad-mouthed the chicken dance in the buffet line and then been drawn in by that insufferable staccato? Like a Siren, the allure of synchrony pulls you into the group.

We can see evidence of this proclivity to move together in time across many cultures, from depictions of group dances on cave walls to the enraptured chants of soccer fanatics. But why? What is it about communal dance that should render it so appealing to so many? European explorers, including Charles Darwin, wondered these same questions as they observed the peculiar rhythmic rituals of the “savages” and “primitives” that they encountered. Indeed, they may have been mulling over this conundrum  as they donned their own costumes in preparation for the local carnivals where they would engage in the very same type of frenzied motion.

Neuroscience has already provided us with one clue to this mystery. Synchrony seems to be built into the brain. Mirror neurons, neurons that fire when performing an action as well as when the subject is seeing that action performed, are found in significantly larger numbers in human brains relative to primate brains. The same neurons responsible for perceiving and understanding an action (say, seeing someone clap his or her hands) are responsible for generating that action (clapping your own hands). We are natural born imitators.

But although these mirror neurons explain how we can synchronize, what has remained unclear is why we synchronize. Researchers have long speculated about the social function of moving together in time. Synchronous action, they have proposed, may play a role in forming and strengthening alliances among group members, affording protection to individuals by enabling collective responses to danger. Surely, any predator would rather face off against an individual than a group—and if you’re part of a swarm or school then the chances of being the unlucky lunch special significantly decrease. So an affinity for synchrony promotes the very activities that will keep you safe. Individuals that move together, survive together.

The Stanford researchers put this theory to a clever test. One of the main problems that groups face is known as the free-rider problem—when some individuals mooch off the rest, taking from the common pot but not giving anything back. You know the type: never chipping in for gas, in the bathroom when the bill comes, empty-handed at potlucks. Free riders benefit in the short term, but they ultimately hurt the group by sapping resources.

The researchers wondered if collective movement might somehow trigger a more cooperative spirit, preventing the emergence of potential free riders. So they asked college students to march around campus together, or to sing the Canadian national anthem in unison.

Relative to students in a control condition, who had simply ambled about, the students who had walked in lockstep around campus were more cooperative in subsequent economic games, felt more connected to each other and trusted each other more.

Students who sang in unison showed the same effects relative to a control group of asynchronous singers. This effect even extended into games that pitted the good of the group against self-interest. Participants were willing to incur direct costs to themselves to cooperate with the students with whom they had synchronized.

Interestingly, it has already been shown that motor coordination of other sorts can serve “pro-social behavior,” behavior that contributes to the well-being of another person. For example, the tendency to unconsciously mimic nonverbal cues is related to altruism. In one study conducted by psychologist Rick van Baaren at the University of Nijmegen in The Netherlands, participants who had unknowingly been mimicked by an experimenter (in body orientation and arm and leg position) were more helpful to experimenters as well as unrelated others, on a subsequent task.

But these types of processes were thought to exclusively operate on a non-conscious level. The second someone becomes aware of the mimicking, these effects disappear. After all, who likes a copycat? Turns out, as long as we’re moving synchronously, we all do.

These new findings open the door to fascinating questions regarding what else synchronization can do for us. The ability to coordinate our own bodies in time and space with other entities has broad applications. For example, the ability to judge the motion of another entity (such as an individual or a ball) and coordinate the action of our own body to converge on a point where we can catch, kick or hit it has obvious implications for athletic performance and most likely factored into our ancestor’s success in hunting prey.  Any opportunity to practice the coordination of our bodies with others—a waltz, a jam session with friends, a tribal chant around the fire—might translate into future success at such tasks. Engaging in rituals involving rhythmic synchrony might not only have bound us together in cooperative groups: they might have brought us together to practice the very skills essential to survival.

Are you a scientist? Have you recently read a peer-reviewed paper that you want to write about? Then contact Mind Matters co-editor Gareth Cook, a Pulitzer prize-winning journalist at the Boston Globe, where he edits the Sunday Ideas section.