We've seen that sex is central to evolution, that it generates diversity, that despite the trouble it causes, it's something most of us can't live without, that abstinence almost always leads to extinction. But how did sex begin?
One idea is that gene exchange [among early microbes similar to our modern day bacteria] facilitated the repair of damaged DNA: an intact string of DNA received from a partner could perhaps be used to replace or repair genes that had been broken.
A second, more exotic idea is that sex was simply infectious. In other words, it arose because a segment of DNA promoted gene exchange in order to spread itself through the population. To use an analogy, it's as though the common cold caused humans to be promiscuous - an effect that would clearly enhance its transmission. One reason a modern bacterium will be moved to have sex is because it's become infected with a particular segment of DNA known as the F plasmid. An individual who's got the F plasmid is then driven to mate with an individual who hasn't, and so spreads the sex habit around.