“Genetic elements … contribute to survival and reproduction of the organism. Those that do not are quickly weeded out by selection.”
—Rob Dorit 
This common statement, and ones like it, is grossly misleading. The assumption behind the assertion that genes are either useful and present or harmful and extirpated is that this is a binary situation where genes are either one way or the other. The reality is that there are more than two choices and, more likely, a gradation from highly undesirable to the organism to highly desirable, with the intensity of natural selection graded as well.
Examining the simplest case first, there are genes that are neither helpful nor harmful. These may have been vestiges of genetic history, passed down through the ancestral lineage that led to a particular generation, and these genes once may have been very useful to some preceding organism. As long as there is no penalty for these genes to remain in the genome, there is no selection pressure to remove them. Likewise, unexpressed genes, those that are hidden deep within the balled-up histone, or those made ineffective through epigenetic processes, cannot have any effect on the organism one way or another, and thus would have no selection bias.
Natural selection and genetics are more complex than often realized. There is antagonistic pleiotropy, for instance, which is the term given to a gene that has a strong positive reproductive effect on the young and an adverse impact on the old. Such a gene will be retained in individuals of the species because of its dominant effect during the reproductive years, despite the fact that it may disadvantage those same individuals later in life. It has been thought that males have genetically shorter life spans than females because they possess more of these antagonistic pleiotropic genes than do females.
There is also a multilevel genetic selection, where the survival of certain genes operates for ecosystems as a whole, populations within ecosystems, species within populations, individuals within species, and specific competitive genes within an individual genome. All genetics are contained in the cells of an individual, to be sure, but individual genomes can support these other levels to the benefit of genetic survival and reproduction. The multilevel genetic selection can provide opportunity for the retention of genes that have no particular benefit for the individual, but can support an ecosystem, for instance. This opens the possibility that cooperation among species, rather than competition, can be a driver of natural selection. Examples of this might be nitrogen-fixing bacteria living within the roots of leguminous plants, the giant green anemone as a fusion (chimera) of green algal cells with the animal tissues of the anemone, the amalgamation of sundry organs to form a complex multicellular organism, and the digestive microbiomes in humans and animals. Genes that allow such cooperation could be retained in an individual genome because the overall benefit of retention exceeds the cost to an individual of maintaining the genes.
There has long been a genetic mystery about retention of genes that are clearly somewhat disadvantageous to the reproduction of individuals of a species, but, which, nonetheless, are retained in the genome throughout many generations. The principle of survival of the fittest (natural selection) would seem to dictate that only the genes most beneficial for survival and reproduction of individuals would remain in the genome, and all others would be lost over time. However, that is not always the case. There is genetic material clearly not optimum in the genomes of some individuals of a given species.
This mystery may be explained by considering natural selection in a multilevel context. Yes, natural selection would seem to indicate that for any given organism it would be best to carry the genes that maximize survival and reproduction, but, from a species standpoint, looking at it from a vantage point above each single organism, the species can survive best if it maintains some genetic diversity that allows it to meet unforeseen environmental challenges. No realistic environment is so invariant that one set of genes is the only one to meet the test of natural selection.
Engineers can look at this as an optimization process. Biological optima are rarely narrow; they are more likely to be broad, as long as deviations from the exact optimum do not carry penalties too large. Retaining genes that are beneficial to survival and reproduction, just not as beneficial as some other genes, is a strategy that carries some small penalty for certain individuals, but allows them to survive better than their relatives if the reproductive environment undergoes changes. Thus, the whole species is not disadvantaged.
A thorough understanding of genetic dynamics is useful to all engineers dealing with biological systems. That is why we must question oversimplifications similar to the above quote. Natural selection, as powerful as it is, is not always as simple as it seems.
- R. Dorit, Amer. Scientist, vol. 101, no. 5, p. 345.