From an evolutionary perspective, it makes no sense whatsoever that music makes us feel emotions. Why would our ancestors have cared about music? Despite many who'd argue the contrary, it's not necessary for survival.

"C or C-sharp is very rarely a matter of life and death," says Jean-Julien Aucouturier, a neuroscientist who researches music and emotion at the French Institute of Science in Paris. "Beethoven or Lady Gaga — like them or not — it’s not something you have to scream or run away from."

It's a question that has puzzled scientists for decades: Why does something as abstract as music provoke such consistent emotions?

It's quite possible that our love of music was simply an accident. We originally evolved emotions to help us navigate dangerous worlds (fear) and social situations (joy). And somehow, the tones and beats of musical composition activate similar brain areas.

"It could be the case that it evolved serendipitously, but once it evolved it became really important," Robert Zatorre, a neuroscientist at McGill University, says.

Here are a few theories on how that happened.

Our brains love patterns. Music is a pattern. Coincidence?

Studies have shown that when we listen to music, our brains release dopamine, which in turn makes us happy. In one study published in Nature Neuroscience, led by Zatorre, researchers found that dopamine release is strongest when a piece of music reaches an emotional peak and the listener feels "chills"— the spine-tingling sensation of excitement and awe.

That may explain why we like music. But it doesn't explain why we developed this liking in the first place. Typically, our brains release dopamine during behavior that's essential to survival (sex or eating). This makes sense — it's an adaptation that encourages us to do more of these behaviors. But music is not essential in the same way.

"Music engages the same [reward] system, even though it is not biologically necessary for survival," says Zatorre.

One possibility, he notes, is that it's a function of our love of patterns. Presumably, we evolved to recognize patterns because it's an essential skill for survival. Does a rustling in the trees mean a dangerous animal is about to attack? Does the smell of smoke mean I should run, because a fire may be coming my way?

Music is a pattern. As we listen, we're constantly anticipating what melodies, harmonies, and rhythms may come next. "So if I hear a chord progression — a one chord, a four chord, and a five chord — probably I know that the next chord is going to be another one chord, because that’s prediction," Zatorre says. "It’s based on my past experience."

That's why we typically don't like styles of music we're not familiar with. When we're unfamiliar with a style of music, we don't have a basis to predict its patterns. (Zatorre cites jazz as one music style that many unacquainted have trouble latching onto). When we can't predict musical patterns, we get bored. We learn through our cultures what sounds constitute music. The rest is random noise.

Music fools the brain into thinking it's speech

These explanations may describe why we feel joy from music, but don't explain the whole other range of emotions music can produce.

When we hear a piece of music, its rhythm latches onto us in a process called entrainment. If the music is fast-paced, our heartbeats and breathing patterns will accelerate to match the beat.

That arousal may then be interpreted by our brains as excitement. Research has found that the more pleasant-sounding the music, the greater the level of entrainment.

Another hypothesis is that music latches onto the regions of the brain attuned to speech — which convey all of our emotions.

"It makes sense that our brains are really good at picking up emotions in speech," the French Institute of Science's Aucouturier says. It's essential to understand if those around us are happy, sad, angry, or scared. Much of that information is contained in the tone of a person's speech. Higher-pitched voices sound happier. More warbled voices are scared.

Music may then be an exaggerated version of speech. Just as higher-pitched and speedier voices connote excitement, so do higher-pitched and speedier selections of music.

"The happiest I can make my voice, a piano or violin or trumpet can make it 100 times more happy in a way," Aucouturier says, because those instruments can produce a much wider range of notes than the human voice.

And because we tend to mirror the emotions we hear in others, if the music is mimicking happy speech, then the listener will become happy too.