From the perspective of self-replicating molecules (RNA and DNA), a healthy, sexually motivated organism is an optimal EXTERNAL environment. An organism is NOT an internal system from the perspective of genes.
Life originated from accumulations of large molecules (ribonucleic acids) that reacted in chain processes to result in more of their kind. This self-replication of RNA, even of artificially created RNA, has been proven in laboratory experiments. However, the basic self-organization and self-replication of ribonucleic acids is extremely time-consuming and does not progress far under lab conditions.
In the history of the Earth, the chemical chain reaction of self-replication occurred at a higher frequency under favorable conditions. Initially, these favorable conditions were accidental.
Also by chance, but already according to the principles of natural selection, some of these molecular accumulations not only thrived under favorable conditions but influenced external conditions so that they would become more favorable for their self-replication. In practice, ribonucleic acid enzymes (ribozymes) catalyzed the self-replication of certain RNA molecules in favorable environments.
All forms of life, including our own, are just favorable EXTERNAL conditions for the self-replication of RNA and its slightly modified form, DNA.
Life didn’t just happen out of nothing. It’s a logical consequence of chemistry under favorable conditions, but nevertheless just a result of chemical reactions.
It is a matter of subjective interpretation where in the course of ever more elaborately modified external conditions one wants to set the origin of life, since the increasing complexity of these molecular accumulations is more or less linear over time.
Favorable conditions, and the active interaction of self-replicating molecules with their immediate surroundings to make those surroundings more favorable to their replication via enzymatic action, are very much at the foundation of life. The strategy has been successful on Earth, which is why we have a diverse biosphere all around the globe.
There are several terms to describe an optimal condition of this immediate external environment of self-replicating molecules, which is organized as an organism. It can be called “health” or, more technically, “homeostasis”.
Organisms display multiple functions to ensure that they are in an optimal condition for self-replicating molecules. At the root of all these functions is motivation. Without motivation, the function of an organism (the immediate external environment of self-replicating molecules) cannot be organized.
This is why even the most primitive organisms, for example Caenorhabditis elegans, have strong motivation. Caenorhabditis elegans is a nematode, a roundworm, with just about 1,000 cells, of which about 300 make up its nervous system. Caenorhabditis elegans shows a strong sex drive and even risks annihilation to pursue sexual reproduction. If hermaphrodites are at a food source, males stay there. If no hermaphrodites are at a food source, males wander around.
It is not that organisms have various drives such as seeking nutrition, avoiding danger and escaping negative stimuli, as well as seeking reproduction. Organisms really only have one purpose, only one drive, only one motivation: reproduction.
All other so-called drives are just logistical measures to facilitate reproduction. Organisms avoid annihilation so that the self-replicating molecules, the one driving force behind any organism, have an easier time self-replicating.
The drive for favorable conditions for the self-replication of RNA and DNA is the most basic axiom of life. Everything else is just building on it.
Why do human beings and other animals have senses? To detect disturbances to the immediate environment of self-replicating molecules.
And why can animals move? To escape unfavorable conditions for the self-replication of RNA and DNA, and to seek out more favorable ones.
And why do humans have feelings and emotions? For the same reason they have senses.
And the same goes for memory, language, and all cognitive functions. It even goes for ideologies, including the Kreutzian ideology you are reading about on this site. Its success rate depends on the extent to which it supports the self-replication of self-replicating molecules. And I guess it does a good job at that, which proves its biological truth.
The organizing principle of all nervous system functions, and their anatomies, is the motivation to ensure favorable conditions for the self-replication of RNA and DNA. Without motivation, all other brain functions are not just useless; without motivation, other brain functions wouldn’t be there in the first place.
The sex drive isn’t a diffuse desire but is rooted in mechanisms by which self-replicating molecules influence their surroundings to make conditions more suitable for self-replication. Thus, libido can be broken down into a multitude of influences of RNA, and its slight modification DNA, on their environment to facilitate this self-replication. Evolution never functioned to achieve self-preservation, only self-replication. And this cause is evident in all forms of life, and in their behavioral expression, up to the level of interaction in human society and philosophy.
What appears to be a drive towards self-preservation and behavior directed at avoiding annihilation is but a logistical organization for self-replication. That is why the males of black widow spiders risk ending up as a meal, and why young men accept a high risk of death for a chance to become sexually desirable heroes.

