Existing theories seem incomplete, so here’s another one. I think music is a side-effect of the evolution of self-awareness and love.

Music does have a lot of features we associate with sexual competition. It’s (historically speaking) an honest display of abilities, it exploits supernormal stimuli, and it’s sexy. But if those things were sufficient for its evolution, it would be widespread in other species. Instead, music seems to be nearly unique to humans.

In most species, displays are simply flamboyant exhibitions of individual prowess. Every peacock aims to have the biggest, flashiest tail; there is none of the complexity or diversity we associate with music. Guppies appreciate novel colors in their mates, but they do not evolve increasing complexity.

Closer to human music are the songs of certain birds. While nobody would deny that most bird song is some sort of sexual competitive signal, song complexity isn’t consistently linked to sexual selection at all. And relatively complex and varying bird songs, such as those of the song sparrow, can be generated using simple algorithms. Nothing in the animal world even remotely approaches the complexity and diversity of human music.

It’s also often suggested that music contributes to group bonding, which could be advantageous for a species like ours, where inter-tribal competition may have influenced evolution. And since humans are unusual in that sense, it also helps explain the uniqueness of music.There’s plenty of evidence that music does play this role. However, group selection is typically a weak force, while music is a costly feature; it’s hard to see how the former could be sufficient to account for the latter.

Perhaps music evolved as a sexually selected feature which was co-opted under group selection, but perhaps there’s a bigger hole in our thinking.

What neither idea seems to explain at all is why music is, well, musical. Why should a group — or, for that matter, pair - bonding involve the sort of fractal complexity, continual novelty and specificity of taste that sets music apart from common birdsong?

Here’s why — maybe.

Hofstadter inGödel, Escher, Bach: An Eternal Golden Braidargues that consciousness is a recursive computational process. Self-awareness in addition implies that the conscious mind contains a model or representation of the self.

What is this model? Whyrepresentyourself, when you can simplybeyourself? The answer, presumably, is that most of the mind is not conscious, nor even accessible to consciousness. So to have insight into your own behavior, you mentally model yourself in much the same way you model other people.

You see the problem. Modeling other conscious, self-aware minds requires an internal conscious, self-aware mind for every mind you model. Each of these models must in turn have its own models of other conscious, self-aware minds… and so on to infinity.

Our brains do not have infinite capacity. So what do we do when we encounter an infinitely recursive process? Curl up in despair? No! We approximate. We gaze as deeply as we can into the fractal, stretching the limits of our cognitive capacity. And then we acknowledge and accept those limits. We marvel at the tininess of the self in the wondrous grandiosity of the universe. We are overcome with spiritual joy.*

In other words, we congratulate ourselves on our willingness to face the limits of our comprehension. Why does this make us feel good? It’s adaptive.

We are a highly social species. Many researchers believe that human cognition was, for much of our evolutionary history, stuck in a positive feedback cycle of social selection.** That is, those of our ancestors who could better understand and predict others had greater evolutionary fitness, which made each succeeding generation harder to understand and predict than its parents.

So: it’s advantageous to enjoy peering into the depths of interesting fractals, because that stretching of cognitive ability is precisely what’s required to model minds better than our peers. And music is mostly interesting fractals.

I want to take things a little further. Let’s talk about love.

We’re not just social. Lots of animals are social, and most of them are utter jerks. Humans, along with many birds and a few mammals, have unusually strong, lasting cooperative relationships among unrelated adults. We haveloveandtrust.

But how do you evolve trust?I’ve puzzled over this for years. We understand perfectly well how cooperative relationships can be adaptive, for example, if your partner is likely to punish your defection severely, and hiding defections is too hard. But that doesn’t explain trust.

I trust youmeans, precisely, that I’mnotpolicing your defections. I’mnotmonitoring the evidence to check if you’ve betrayed me. I’mnotsetting in place punishments for all the awful things you might do. I’m not evenworryingabout them.

And I think we all want trusting relationships. I don’t know anybody who would be okay with believing that their partner’s honesty was only a consequence of the fear of punishment — let alone their own.

Obviously, trusting saves a lot of effort and conflict in a relationship, which makes it adaptive. But it’s also vulnerable to exploitation, hence the evolutionary problem. According to standard theory, the moment you know I trust you, your motivation should change to exploit me. But I should know this, and therefore not trust you in the first place.

A solution to this quandary isemotional commitment. Love in the form of emotional commitment is a self-modification that alters our cognitive payoffs to favor the interests of the other. If I love you, then I literallycannothurt you without hurting myself. If I love you, then making you happy literally makes me happy. If love is mutual, then our interests become aligned. And that enables trust.

How do we create love? By a process of massive cognitive remodeling. Our brains must learn to respond to the stimuli of the other with extreme, unique pleasure, and they must learn how to likewise uniquely stimulate the other. To do that effectively, we create the most profound representation we can of the other, and imbue that representation with almost as much significance as we attach to our self-representation. And in a two-way relationship, that representation must contain a self-representation, containing an other-representation… and so on down the recursion rabbit-hole.

That, I think, is a big part of what courtship and friendship do in species with long-term relationships. It’s an intimate mutual rewiring in which our brains gradually learn to play and be played; we allow the other unique insight into our self-model, so they can learn to uniquely reward us; and vice versa. Love makes us vulnerableand powerful at the same time. In keeping with this idea, pair-bonding, rather than simply social group size, is the most widespread predictor of brain size evolution in other species. Among primates, brain size and sexual competition arenegatively correlated.

Our ancestors won their success in part because they were able to create and maintain trust. So they evolved to love, and loving required them to find unparalleled pleasure in the effort to contain an infinite depth that they could never really grasp.

So the sense of immersion in fractal depth feels like love, because that’s what the experience of lovingis. And when we encounter an audible fractal process that happens to stimulate our brains with a perfectly culturally-attuned interleaving of familiar and foreign, self and other — we willingly immerse ourselves in it. We don’t just like music. We love it.

** This is called the social brain hypothesis. This piece is based on the assumption that it’s right, but it could be wrong; there isn’t consensus on it.

This questionoriginally appeared on Quora - the place to gain and share knowledge, empowering people to learn from others and better understand the world. You can follow Quora on Twitter, Facebook, and Google+. More questions: