This essay is excerpted from Adam Rutherford’s Humanimal: How Homo Sapiens Became Nature’s Most Paradoxical Creature—A New Evolutionary History published by The Experiment 2019.

I could quote dozens of different statistics to address the question of how many people are homosexual—there is no consistent figure. Nor is there a consistent pattern of behavior that allows easy or clear definitions or demographics. Some people appear to be exclusively homosexual from a young age, and some exclusively heterosexual. Many are somewhere in between, in that they might be primarily one way or the other, but have had homosexual, bisexual or heterosexual experiences or thoughts once, sometimes or regularly. Some studies have shown that 20 percent of adults have been sexually attracted to members of the same sex, though the percentage of people who have enacted same-sex encounters is typically half of that.

Precision in these demographics doesn’t really matter when thinking about the broad sweep of evolution. Homosexuality exists, and hundreds of millions of people identify as homosexual. Conception remains an impossibility following homosexual sex, which superficially suggests that it might be maladaptive. That poses a potential problem when searching for an evolutionary exploration of a particular behavior. How can sexual behavior that cannot produce offspring persist at such a high frequency? Could this be an example of something that has delineated a boundary between human animals and non-human animals?

Apparently not. Homosexuality abounds in nature too.

Consider the giraffe. Giraffes are beloved of evolutionary biologists for a number of reasons. They are, of course, the tallest of all living animals, and that elegant neck is the primary reason why. The origin of that beautiful neck has also been attributed to sexual selection. It is extravagant and slightly absurd, like a peacock’s tail, so it might be one of those runaway traits that we see exaggerated in males of so many sexual beasts. This is where the sex lives of giraffes gets interesting. The neck is certainly a major part of sexual and social behavior. Since 1958, the male-to-male wrestling that giraffes are often seen engaging in has been called “necking.” They curl their necks around each other and rut. It’s incredible to watch, the necks twisting and bending at almost right angles, the normal grace of these animals replaced by ungainly aggression and awkward legs, with none of the elegant power of two stags clashing antlers.

Necking, as with its human teenage counterpart, is often foreplay to more serious sex. It looks similar to many male-to-male competitive behaviors that precede copulating with a female. They battle, and one comes out on top. The primary difference in giraffes seems to be that after a bout of heavy necking, the males will often have penetrative sex. As with so many of the interesting behaviors of wild animals that we observe and try to understand, there hasn’t been a great deal of work in this area. Numbers therefore are not huge, and robust conclusions are elusive. But it does appear that the majority of sexual encounters in giraffes involve two males necking, followed by anal sex. Not all necking encounters result in attempted or successful mounting, but in many cases, the necking males spar with erect unsheathed penises.

Giraffes tend to segregate by sex most of the time. The necking behavior happens almost exclusively in male herds. In one report, recording more than 3,200 hours of observation over three years in national parks in Tanzania, sixteen male-on-male mountings were seen, nine of which featured an unsheathed penis. The naturalists assumed initially that this was an expression of dominance, but saw no activity (normally indicated by submission, or a particular posture) surrounding the act that supported that idea. In the same period, they only saw one male mount a female. Sixteen out of seventeen is about 94 percent.

We don’t know why they behave like this. Twenty-two calves were born in the same period, presumably following heterosexual action, so it follows that most mountings must have gone unobserved, but that also implies that more same-sex male mountings also happened. This data and other observations suggest that male giraffes don’t have sex with females very often. When they do, they lick and smell the urine of the female, and then follow her around for a couple of days. The females will repeatedly frustrate the attempted mount by a male via the impressively nonchalant tactic of simply walking forwards. They eventually stand still if they are in the mood.

Even with scientific caution in play, it seems safe to say that most giraffe sexual encounters are male homosexual. Logic dictates that a species that is exclusively homosexual will not survive for very long. However, one in ten is still enough for a species to continue, and indeed twenty-two calves born in a three-year period is a decent brood. Female giraffes appear to be fertile and receptive for only a couple of days a year, and with a gestation period of up to one and a quarter years, they’re not particularly prone to a quick generational turnaround.

The homosexual encounters are clearly an activity that has some social meaning, though it’s not obviously the establishment of a hierarchy or dominance. We don’t know much more than that.

Many other animals also engage in homosexual sex, including rats, elephants, lions, macaques, and at least twenty species of bat. There are fewer documented examples of female homosexuality, but then there is much less data on female sexuality in humans and other animals in general. As with so many areas of science, there has been a historical skew toward understanding male behavior. Of the sapphic relations we do know about, we have a better understanding of biological principles that might be at work. Farmers are entirely untroubled by homosexual activity in goats, sheep, chickens, and even use cows mounting each other as a good sign that they are fertile. Whiptail lizards can reproduce using parthenogenesis, the virgin birth that we also see in Komodo dragons, and female-on-female mounting may be a mechanism to induce ovulation. Like bonobos, hyenas live in a matriarchy. Females are dominant, more aggressive and more muscular than males. They also have an unusual set of genitalia: the clitoris is huge, erectile and only slightly smaller than the male penis. Females engage in clitoral licking frequently, to bond socially and to establish hierarchy.

Homosexuality does pose an evolutionary puzzle, though there are plenty of ideas as to how this behavior might persist through time. In humans, there has been some evidence of regions of DNA that associate with male homosexuality. This is not a “gay gene” as the media would have you think, as there are no genes “for” complex behaviors. Rather, it seems (though data is somewhat limited) that certain sections of genetic code occur in versions that are more frequently associated with homosexuality than by chance. If that sounds mealy-mouthed and painfully caveated, that is where we are currently at with genetics and complex social behaviors. Almost no human traits are determined by the flick of a DNA switch, but instead by many genetic factors interacting and contributing small effects in concert with the lived life of experience.

All the myriad versions of genital engagement in us and other animals shows that sex is very clearly not only for making babies. We sometimes make the error of assuming that a behavior is an evolutionary antecedent to our own, or that, conversely, it has emerged in parallel because it is a good trick. The marvelous carnival in nature shows that sex is important, and that evolution finds ways to utilize what it has available to do what needs to be done. Many people know of the maxim said by the biologist François Jacob describing natural selection as a tinkerer. I like to think of the words of the US president Teddy Roosevelt: “Do what you can, with what you have, where you are.”

Evolution invented parts thrown together through error and trial, which can then be deployed to try new things to fit the ever-changing environment. Sexual reproduction is clearly a useful ability to have in one’s armory, and has been with us for at least a billion years, from a time when complex life had yet to fill the oceans, the skies and the land. Since then, the basic function of making offspring from two parents has been co-opted countless times to further create endless opportunities to enhance survival. We could try to deconstruct the ontology of homosexual behavior in us. We could attempt to deconvolute and extract the biological and social cues that lead to a person having a preference or even a “type,” whether it involves blondes, or kindness, or athletic physiques, or kind blonde athletic types of the same sex, or even the Papuan cultural rites of passage into manhood. Like all behavior, sexuality is programmed, not simply by genes, or the environment, but by inscrutable interactions between biology and experience.

There is a political point that unavoidably emerges from this. Homosexuality abounds in non-human animals. Superficially, it appears to run counter to the general principles of evolution, but the more we look at the etiology of sex, the more this doesn’t necessarily seem to be problematic for science.

Rather hilariously, in November 2017, a Kenyan official responded to reports and photos of two large male lions in Maasai Mara engaging in anal sex (as they frequently do), with the statement that they must have copied it from watching men do it. Imagine what he’ll think when he finds out about the giraffes. Amusing though that might be, homosexual men and women are persecuted, jailed, tortured and murdered in many countries all around the world, including Kenya, and suffer prejudice everywhere.

Historically, the assertion that it is contra naturam—against nature—has been made in order to justify that persecution. Whatever the nature of homophobic bigotry, science is not on your side. As we have seen, homosexuality is natural, and it’s everywhere.

Excerpted from Adam Rutherford’s Humanimal: How Homo sapiens Became Nature’s Most Paradoxical Creature—A New Evolutionary History in 2019. Reprinted by permission of the publisher, The Experiment. Available wherever books are sold, and theexperimentpublishing.com