A skeptic wrote in to say that since adulterers take steps to prevent pregnancy, adultery has nothing to do with a strategy for spreading genes. When the genes don't get propagated, it's because we are smarter than they are. Again, not if you remember that human behavior is the product of a complex brain with many components, which can be thought of as distinct circuits, modules, organs, or even little agents, as in Marvin Minsky's metaphor of The Society of Mind. Perhaps there is a component for sexual desire that serves the long-term interests of the genes by making more children, but there are, just as surely, other components that serve the interests of the genes in other ways. There is a second reason that behavior should not and does not maximize fitness.
Natural selection operates over thousands of generations.
For ninety-nine percent of human existence, people lived as foragers in small nomadic bands. They are not wired to cope with anonymous crowds, written language, modern medicine, formal social institutions, high technology, and other newcomers to the human experience. Since the modern mind is adapted to the Stone Age, not the computer age, there is no need to strain for adaptive explanations for everything we do, such as pornography, drugs, movies, contraception, careerism, and junk food. Before there was photography, it was adaptive to receive visual images of attractive members of the opposite sex, because those images arose only from light reflecting off fertile bodies. Before opiates came in syringes, they were synthesized in the brain as natural analgesics.