We all know what it’s like to feel as insecure as an e-mail password. We know we should raise our hand in class, but are afraid we’ll sound stupid. We pine silently for our crush, but keep our distance so they don’t laugh in our face. We want to voice our idea in the meeting, but can’t find the words—until we hear someone else say them first.

Call it social anxiety, self-doubt or inhibition. Whatever we call it, it’s insecurity, and it’s a universal part of the human condition.

This urge to hide starts with the perception that something is wrong with us—we’re awkward, annoying, boring, stupid, a big loser, incompetent or any of a million other not-good-enough traits. And we think unless we conceal our perceived flaw, it will become obvious to everyone, who will then judge and reject us.

The mental health profession has even codified insecurity: at some point in life, 13 percent of Americans will cross the line into social anxiety disorder, meaning insecurity that gets in the way of living the life people want to live. We deliberately pass up class participation points. We pass up promotions because they require public speaking. We turn down invitations because we suspect our friends are only including us out of pity.

Furthermore, nearly half of us—40 percent in fact—identify as shy, which is simply the everyday way of saying that insecurity roars to life in social situations where we fear our perceived flaws will be revealed.

And then we kick ourselves: “This is stupid!” “Why can’t I do this?” “What is wrong with me?” The answer: nothing. Social anxiety is a disorder precisely because our perceived fatal flaw is just that: a perception.

If it causes all this misery and hand-wringing, why did insecurity stick around through millennia of evolution? What use does it have? Why didn’t it fall away with our tails or get traded for opposable thumbs?

It turns out insecurity isn’t an oversight of evolution. In fact, it’s necessary: a healthy dose of self-doubt spurs us to monitor ourselves and our interactions. It prompts introspection and helps us identify how to get along better with our fellow humans. In short, we doubt ourselves in order to check ourselves. And those doubts buy us at least three traceable benefits.

First, the biggie: propagation. In 1984, developmental psychologist Cynthia Garcia Coll of Carlos Albizu University in Puerto Rico named the inborn tendency to withdraw from unfamiliar situations, people and environments behavioral inhibition. This is our degree of caution when faced with new people, places or events. And it’s not just found in toddlers clinging to mom’s leg or cats hiding under the bed when company arrives. In any organism, from bacteria to fish to modern Americans, behavioral inhibition wires us to look before we leap. It’s designed to keep us safe and, ultimately, alive, which helps ensure our genes will make it to the next generation.

To further illustrate the importance of behavioral inhibition, let’s turn it on its head. What’s the opposite of insecurity? Total confidence? Complete fearlessness? At first, that sounds amazing. But be careful what you wish for. Only 1 percent of the population has achieved this dubious goal: psychopaths. Turns out a total lack of insecurity is actually a sign of things gone wrong.

A study by Niels Birbaumer and his team at the University of Tübingen put individuals with social anxiety disorder and criminal psychopaths through an MRI scanner. In those with social anxiety, they found the neural signature of a hair-trigger social smoke alarm: an overactive frontolimbic circuit. In psychopaths, they found the exact opposite: an underactive frontolimbic circuit. Additional studies have strengthened the idea that psychopathy and social anxiety lie at opposite ends of the spectrum.

Credit: St. Martin's Press.

Therefore, in addition to the evolutionary jackpot of reproduction, the second thing insecurity buys us is group harmony. A little insecurity in each of us maintains social cohesion rather than letting rampant psychopaths drag down the whole group. A group that maintains harmony avoids burning its finite time and energy on internal conflict. Over time, a harmonious group will outcompete those weighed down by infighting and power grabs. Indeed, playing well with others is a smarter evolutionary strategy for the group, not to mention all the individuals within it.

And we need a group. Unlike solitary species like tigers or bears, we’re social animals, wired to live together. In ancient times, banishment was the worst possible punishment. Being cut off from the group meant certain death, and in some species—chimps, lions and wolves—it still does.

So the third thing insecurity buys us is actual security. Even if online grocery delivery has supplanted our reliance on the group to hunt and gather food, we still need a group for community, belonging and plain old love. A healthy dose of insecurity allows us to get along and stay safely in the fold.

There’s more: Behavioral inhibition and social anxiety are a package deal. They often come bundled with valuable skills, like conscientiousness, high standards, a strong work ethic, an ability to remember individual faces, empathy and a tendency to work hard at getting along with fellow humans—a skill that’s never been more valuable than in today’s fractious, divided world.

Therefore, from nature’s perspective, it’s better to have an overactive social smoke detector. It’s better to ring a false alarm when there is no threat than to miss a real threat. False alarms are annoying, but it’s much better than the house burning down around us.

Let’s wrap it up with a bow and take it home. Insecurity persists because it buys us more than it costs us: self-awareness, safety, group harmony, belonging and a much better life than that of a psychopath. Maybe the shrinking violets and wallflowers of the world are actually the foundation of this beautiful bouquet of humanity.