What’s up with flags?

We pledge allegiance to them. We fight with them. We fight for them. We fight over them. We are buried with them.

We’ve created elaborate codes for them.

“The flag should be hoisted briskly and lowered ceremoniously,” says the American Legion—keeper of the Flag Code–which also warns that “the flag should not be draped over the hood, top, sides, or back of a vehicle or of a railroad train or a boat.”

We have extensive, detailed rituals dictating our behavior toward them.

In the United States, as the national anthem is being played, Americans in uniform “should give the military salute at the first note of the anthem and maintain that position until the last note.”

And for everyone else, instructs the Legion, they “should face the flag and stand at attention with their right hand over the heart, and men not in uniform, if applicable, should remove their headdress with their right hand and hold it at the left shoulder, the hand being over the heart.”

The United States has created its own special day for them—National Flag Day—on June 14.

But this isn’t confined to the United States by any means.

Nearly all countries have designated days to honor their flags. Australia’s Flag Day is September 3. September 26 is Ecuador’s Dia de la Bandera. May 18 is Haiti’s flag day. February 15 is Canada’s. October 27 for Greece. Kurdistan isn’t technically a country but it still celebrates its flag on December 17. And on and on and on.

Beyond being celebrated across place, flags are a feature of societies stretching across time and cultures, too. The Flag of Scotland dates to 832. Austria adopted its flag in the 1200s.

And thousands of miles and years away, Persians had a flag. The Shahdad Standard dates back to around 2400 BCE.

“Mounted on a copper pole topped with a bird, perhaps an eagle, the squared flag depicts two figures facing one another on a rich background of animals, plants, and goddesses,” according to the Archaeological Institute of America.

And forget countries.

Who doesn’t have a flag these days?

States, oil companies, high-fructose corn-syrup slingers, hamburger joints, rebel factions, the Red Cross, the Red Crescent and even the Girl Scouts have invested in creating and distributing their flags.

So what’s going on here? Why do humans across time and place—history and culture–keep creating symbols on sticks?

In two words: group identity.

In two more words: group survival.

Flags are totem poles by another name.

We might be living in an age of VR and 5G. We might have self-driving cars and self-learning robots. We might go to Mars in a decade or two.

But we’re also animals born with pre-ware–software we never chose to install and can’t uninstall. Our programming seems to give symbols power over us–and to us.

We create flags, and flags create us.

Time to dust off Shannon P. Callahan and Alison Ledgerwood’s study for the American Psychological Association’s Journal of Personality and Social Psychology.

In 2016, the two UC Davis researchers wanted to understand the psychological function of flags, so they tested out three hypotheses:

First, does “simply having a symbol leads collections of individuals to seem more like real, unified groups?”

Second, does this “increased psychological realness leads groups to seem more threatening and effective to others”?

And third, do “group members therefore strategically emphasize symbols when they want their group to appear unified and intimidating”?

Yes, yes and yes.

Their topline conclusion:

“The presence of a symbol led groups to be perceived as more cohesive, which led them to be perceived as more entitative and real,” according to the UC Davis researchers.

[“entitativity” is a fancy word meaning perception of a group as a single entity—a thing]

But they had other conclusions, too, which are more interesting and, perhaps, less intuitive.

Psychological research has found that collections of individuals which appear physically similar are more likely to be considered a coherent group.

But what if your group of individuals don’t look alike? Flags can make up for that.

“The mere presence of a symbol,” they write, “can convey a similar sense of psychological realness as that conveyed by actual, intrinsic characteristics of groups… such as physical similarity.”

Oh, and one more thing about the function of flags: they’re good for psychological warfare.

The UC Davis researchers found that their test subjects “strategically prioritized displaying symbols to others when they were motivated to convey an impression of their group as united and intimidating.”

Our bodies aren’t the only thing organized around survival. Our minds are, too.

And the symbols on sticks that our tribes continue creating across time and place promote group coherence–against other groups.