“Every sperm is sacred. Every sperm is great. If a sperm is wasted, God gets quite irate,” goes the song from Monty Python’s movie The Meaning of Life. If the lyrics strike you as funny, it’s most likely because calling a sperm cell “sacred” sounds ridiculous when men can produce so many of them.

In fact, the average male will produce roughly 525 billion sperm cells over a lifetime and shed at least one billion of them per month. A healthy adult male can release between 40 million and 1.2 billion sperm cells in a single ejaculation.

In contrast, women are born with an average two million egg follicles, the reproductive structures that give rise to eggs. By puberty, a majority of those follicles close up and only about 450 will ever release mature eggs for fertilization.

But if it only takes one sperm and one egg to meet and create a baby, then why do men produce such a whopping number of sperm? Wouldn’t it be less wasteful for a man to release a single sperm, or at least fewer, to meet one egg?

The reason for this predicament boils down to two words: sperm competition. Since the dawn of the sexes, males have vied with each other to get as many of their own sperm near a fertile egg as possible. Getting more of your sperm closer to an egg means there is a greater probability that it will be you and not your neighbor fertilizing it.

This kind of competition is an evolutionary imperative for males of any species. If a rival’s sperm fertilizes an egg, then an opportunity to pass on your genes is lost. Through many generations, as the reproductive spoils continually go to the highest sperm producers, their genes are passed on. The genes of the smaller sperm producers are eventually weeded out of the population and become a footnote to evolutionary history.

But if it was just a matter of ‘more is better,’ then animals of all species would have evolved ridiculously large testicles in a bid to overwhelm the competition. But it’s not quite that simple—numbers are important, but so is proximity. Fertilizing an egg is not just about how much sperm you can produce. It is also about how close you get your sperm to it.

In the early 1980s, researchers in the United Kingdom and the United States realized that both proximity and number were important factors in the physiology of primates, including humans. In primate societies with rigid social structures and one dominant male who mates with all the females, testes trend towards the small. In gorillas, for example, they are very small relative to body weight. (Don’t tell them that.) In gorilla society, one male defends a harem of females to ensure only his sperm gets anywhere near their eggs. In this case, making a lot of sperm doesn’t really help the male gorilla get the job done.

For chimpanzees, on the other hand, sperm competition is a serious issue. In chimpanzee society, many males and females live together in large troops, and females have sex with many males in a short span of time. This is why male chimpanzees possess the largest testes of all the great apes, weighing in roughly 15 times larger than gorillas, relative to their body weight. This gives them a better shot at swamping out the competition.

Human males fall somewhere in between gorillas and chimps. The average man’s testes are roughly two and a half times as big as a gorilla’s but six times smaller than a chimp’s, relative to body weight. This has led some researchers to question whether sperm competition was ever at work in human societies, or whether our relatively large testes are just a hold over from an earlier period in our evolutionary history.