It’s tempting to listen to women’s magazines and believe female orgasms are a small pleasure to make up for periods and pregnancy, what they might call the raw end of Darwin’s deal. But a study published Monday shows that as mammals developed from solitary creatures to societal ones, ovulation became more automatic, and both the orgasm and the clitoris lost their reproductive roles.

Why it matters:

In some mammals, sex stimulates hormone release and is required for ovulation. Somewhere along the way, intercourse became divorced from that biochemical windfall. But when? And how? It’s not easy to study this aspect of sexual arousal in our predecessors.

The new study, published in the Journal of Experimental Zoology, took a look at the lineage of the human female orgasm, tracing it back to a similar biological response earlier female mammals have when they have sex.

Since Aristotle, researchers have looked for the biological and functional purposes of the female orgasm. Men need to have an orgasm to release sperm, but women do not need to orgasm to ovulate or become pregnant. Some researchers have suggested that orgasms persist because they have a psychological function in reproduction—they feel good, so they encourage women to have more sex.

The researchers behind the new study ask: Where does the female orgasm come from?

The nitty gritty:

Mihaela Pavliev, in the department of pediatrics at Cincinnati Children’s Hospital Medical Center, and Günter Wagner, an evolutionary biologist at Yale University, compared more primitive mammals with more complex ones to see how female orgasm diverged from ovulation.

Solitary animals, like cats and rabbits, experience male-induced ovulation—a mature egg is only released from the ovary during copulation. The researchers said there is evidence of a physiological reaction similar to human climax, and when they ovulate, a hormone called prolactin is released.

But women also experience a surge of prolactin when they orgasm, even if they don’t ovulate at that time. The new study shows that female orgasm, and the concomitant hormone release, is likely an ancestral holdover of its reproductive function, because humans and other placental mammals, like primates, ovulate spontaneously. As induced ovulation evolved into spontaneous ovulation, the female orgasm was freed up for another purpose, albeit one without a clear role in human reproduction. Wagner and Pavliev also found that as ovulation stopped depending on orgasm, the clitoris stopped being located inside the vaginal canal.

“Female orgasm is an evolutionary vestige like the appendix,” said Wagner. “It can be used for something, but it is not clear if it has a function beyond psychological bonding between partners,” he said. Wagner compares the female orgasm to the human ability to appreciate music and other, finer aspects of life. “The value of something the human body is capable of does not have to be functional,” he said.

And while the female orgasm has evolved beyond its ancestral role, it can still speed up ovulation in humans—but only if ovulation was going to occur within the hour, said Wagner.

What’s next:

It may have lost its biological function, but the female orgasm is here to stay. That’s because the clitoris and the penis develop from the same part of the embryo. “If the clitoris went away through evolution, so may the penis,” said Wagner. No penis means no way for sperm to naturally enter a woman’s body, so unless we reproduce via medical procedures like in vitro fertilization and artificial insemination, this could threaten the survival of the human race.

Men have nipples for a similar reason—they are left over from a previous stage of the embryo’s development, and don’t have a function besides heightened sexual pleasure. But they are indispensable in women, and for that reason, remain part of male anatomy.

What they’re saying:

To be sure, humans today have sex for reasons that stretch far beyond reproduction.

“The paper is a new way of looking at why females have orgasms, but I don’t think we’ll ever quite figure it out,” said Caroline Pukall, a psychology professor and authority on human sexuality at Queen’s University who was not involved with the new study.

Our basic needs have been met, and “we are able to do more than try to survive,” said Pukall, who is also a sex therapist. Instead of trying to get pregnant, she said, many humans are now trying to limit their fertility. Plenty of people who choose not to have children, or have intercourse with partners of the same sex, still have orgasms, she said, adding, “The argument is clever and compelling, but it doesn’t capture our passions and need for bonding.”

The bottom line:

Female orgasm may have evolved beyond helping us reproduce, but it is still a key part of sex—it makes women feel good and strengthens bonds between partners.

“All of life is much more complex than we give it credit for,” said Wagner.

Republished with permission from STAT. This article originally appeared on August 1, 2016