Charles Darwin published On the Origin of Species in 1859. "Darwin's long-lived innovation was to posit natural selection as the key to evolution. Natural selection is said to occur when environmental conditions favor one variant trait over another. If that variation is genetic and it is reproductively advantageous—that is, if it somehow enables the possessor ultimately to leave behind more offspring than peers who lack that variation—then, according to natural selection theory, over time the species will come to exhibit that trait consistently…
Darwin could not account for all he saw simply with his natural selection theory, so he developed a corollary theory called ‘sexual selection,' which states that a trait may be ‘selected' directly by a mate…
Homosexuality would seem hard to explain via natural selection or sexual selection because it would appear to be reproductively disadvantageous. Nevertheless, nineteenth- and early-twentieth-century theorists did use evolutionary theory to explain how homosexuality could arise by ‘mistake.'”