We’ve all played the lead role in a teen drama laden with angst, sweaty palms, a racing heart, and an inability to concentrate on anything or anyone else but the object of our desire. And just as every Hollywood scenario depicts, crushes can be excruciatingly embarrassing in high school, but can also affect us in adulthood. So it might seem difficult to imagine that all this cringe-worthy behavior has a purpose and is actually good for us — at least most of the time.

Adults can also be taken unaware when cupid strikes, suddenly becoming self-conscious around someone attractive at work or swooning over a celebrity, even when they’re happily married. Why this happens is a bit of a mystery. “Crushes have more to do with fantasy than with reality,” psychologist and author Dr. Carl Pickhardt has written. “They tell much more about the admirer than the admired.”

In its purest sense, a crush is a form of parasocial relationship; a one-sided relationship where you have feelings for someone else but those feelings are not reciprocated, according to Dr. Anna Machin, an evolutionary anthropologist at the University of Oxford’s Department of Experimental Psychology. “The research into the brain isn’t there yet, so we still don’t know whether crushes generate the same [neural] patterns as when someone is genuinely in love,” she said. Despite this, she added, the feeling of infatuation or love that crushes produce is real.

What goes on in our heads?

It’s thought that when we’re in love or lust, the stress and reward systems in our brain are working overtime, and the same is possibly true of having a crush. Nerve cells in the brain release a chemical called norepinephrine that stimulates the production of adrenaline, and give us the feeling of arousal that causes our palms to sweat and our hearts to pound. The feel-good chemical dopamine is also released, making us excitable and talkative, and perhaps explains why we sometimes blurt out unimaginably embarrassing things. This is charmingly described as “word vomit” in the cult film Mean Girls, and exemplified by the mortifying line, “I carried a watermelon” in Dirty Dancing.

It’s thought that when we’re in love or lust, the stress and reward systems in our brain are working overtime, and the same is possibly true of having a crush.

“If we were to reduce down what love is, in a neural sense, it’s a neurochemical reward, so the feelings you have are a mixture of chemicals… and dopamine is your go-to reward chemical in life,” said Dr. Machin. “When you’re in love or you have a crush, you’ll still get your dopamine reward for that, even if your feelings are not reciprocated.” It’s this process that seems to account for our slightly obsessive behavior when we have a crush — think Cameron in Ten Things I Hate About You — because thinking of an unintended brief encounter can make us feel happy, and that’s addictive.

The limbic area of the brain is thought to be involved both in love and crushes. When examined in an MRI scanner, someone in love will typically have high activity in an area of the limbic system called the caudate nucleus. That’s important, because it links to the neocortex, which handles the more cognitive or sensible aspects of love, Dr. Machin explained. Perhaps, this is the area we refer to if we trust our head more than our hearts when it comes to finding a partner. But it means that rather than slavishly following our amorous fantasies, our rational mind regulates the limbic brain’s desire for dopamine. While it wins out most of the time, because the limbic system is associated with addiction, getting over a crush can be tough, and some of us hold a torch for years.

Why do we have crushes anyway?

Is there a higher purpose for having a crush, beyond just making us feel good? Dr. Machin believes they play a strong evolutionary role. “Parasocial relationships in adolescence are a very valuable experience,” she explained. “They are something that’s part of our development because they allow an adolescent to start to explore relationships and their own sexuality and understand what attracts them in a safe way, because they’re not going to get hurt in the same way as they might in a real relationship.”

It’s important to distinguish between imagining what a relationship could be like, and having a crush with the intention of exploring a real relationship.

Whereas many of us have dated the wrong “type” of person, and had our hearts broken as a result, crushes can help ensure this doesn’t happen. “This person [the crush] is the right person because you idolize them,” Dr Machin said. “They’re going to be who you want them to be, therefore, it’s very safe. It’s a training ground for proper relationships in the real world.” Harry Styles, then, might be building a generation’s romantic resilience. “In adolescence, crushes are a healthy thing and teenagers shouldn’t feel embarrassed,” she added.

In adulthood, things are more complicated. It’s important to distinguish between imagining what a relationship could be like, and having a crush with the intention of exploring a real relationship. Dr. Gary W. Lewandowski Jr., a writer and relationship scientist at Monmouth University in New Jersey, said that our evolutionary history suggests we are not a monogamous species. So crushes could be a way to help identify a future or additional partner to meet our needs — or they could be the sign of adults who are simply stuck in adolescence and unable to have a real relationship. “A crush could be a gateway behavior that eventually leads to cheating,” said Dr. Lewandowski.

What are the upsides to this embarrassing behavior?

Left as daydreams, crushes are usually harmless. Research shows that people with crushes often feel like they are in a real relationship, which could be a way to decrease loneliness, and may even boost our confidence. Crushes could help reinvigorate stale relationships by revealing what they are lacking, and give people insight into how to improve their love lives. And even the most unlikely or strange crushes could be enlightening. “People aren’t always good at knowing what they want, so a crush may actually be insight into something you don’t like and didn’t realize or didn’t want to admit,” Dr. Lewandowski said.

How do you cope with a crush as a teenager or an adult? “I’d encourage people to recognize that they are idealizing their crush,” said Dr. Lewandowski. Perhaps take the advice of Cher from Clueless and send yourself flowers and love letters — because ultimately, you can’t control who you have a crush on, so you may as well have fun.