By Serge Kreutz
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 its kind. This self-replication of RNA, even of artificially created RNA, has been proven in laboratory experiments. However, basic self-organization and self-replication of ribonucleic acids is extremely time-consuming and does not reach 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. Favorable conditions initially were accidental.
Accidentally, too, but already along 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.
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, as anyway, the increasing complexity of these molecular accumulations is more or less linear on the time axis.
Favorable conditions, and the active interference of self-replicating molecules with their immediate surroundings to make these surroundings more favorable to their replication by enzymatic action, is very much at the bases 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 Ceanorhabditis elegans, have strong motivation. Caenorhabditis elegans is nematode, a roundworm, of just about 1000 cells, of which about 300 are a nervous system.   Caenorhabditis elegans shows a strong sex drive and it even risks annihilation to pursue sexual reproduction.    If females (which in the absence of males can be hermaphrodites) are at a food source, males stay there. If no females are at a food source, males crawl wandering 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 make reproduction happen. Organisms avoid annihilation so that the one driving force behind any organism, self-replicating molecules, have an easier time to self-replicate.
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 go to more favorable ones.
And why do humans have feelings and emotions? For the same reason for which 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 motivation to assure favorable conditions for the self-replication of RNA and DNA. With no motivation, all other brain functions are not just useless. With no motivation, other brain functions wouldn’t be there in the first place.
Sex drive isn’t a diffuse desire but rooted in mechanisms by which self-replicating molecules influence their surrounding to make conditions more suitable to 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 its 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 to avoid annihilation is but a logistical organization for self-replication. That is why the males of black widow spiders risk ending up as meal, and why young men take the risk of death at a high probability for a chance to become sexually desirable heroes.
1 W.H. Schlesinger, Chapter 10: The Origin of Life and its Consequences, Indiana
2 Kara Rogers, Edna Green Biology, Encyclopedia Britannica, October 16, 2015
3 The RNA World and the Origins of Life , NCBI
4 6 Dimension 3: Disciplinary Core Ideas – Life Sciences, The National Academies Press
5 In vitro evolution of molecular cooperation in CATCH, a cooperatively coupled amplification system, Chemistry and Biology, Volume 5, Issue 12, December 1998, Pages 729-741
6 Hall DH, Russell RL., The posterior nervous system of the nematode Caenorhabditis elegans: serial reconstruction of identified neurons and complete pattern of synaptic interactions., J Neurosci. 1991 Jan;11(1):1-22.
7 Arthur S. Edison, Caenorhabditis elegans Pheromones Regulate Multiple Complex Behaviors , Curr Opin Neurobiol. 2009 Aug; 19(4): 378-388.
8 Caenorhabditis elegans as a Genetic Organism
9 Lipton J1, Kleemann G, Ghosh R, Lints R, Emmons SW., Mate searching in Caenorhabditis elegans: a genetic model for sex drive in a simple invertebrate. , J Neurosci. 2004 Aug 25;24(34):7427-34.
10 Adam K. Bahrami and Yun Zhang, When Females Produce Sperm: Genetics of C. elegans Hermaphrodite Reproductive Choice , G3 (Bethesda). 2013 Oct; 3(10): 1851-1859.
11 Rogers, Lock; Koch, Alan, Sample records for sex reproductive condition , PubMed, Jan. 01, 2014
12 Save the Zombie-Maker! , National Geographic, May 28, 2015