Of course, people aren't like Mister Spock, pure intellects that reason abstractly about the world. And as with the case of perception, many of the emotions have long been profitably analyzed as adaptations. Fear for example has been studied for many years, and since the time of Walter Cannon in the '30s, it's been recognized as an adaptation that prepares an organism to cope with danger. Similarly, sexual desire is uncontroversially an adaptation. It is no mystery why most people would rather make love with an attractive partner than to get a slap on the belly with a wet fish.
Sexual desire leads causally to reproduction.
In How the Mind Works , I argue that similar analyses can profitably be applied to other emotions. I think we have well-engineered neural systems for emotions of disgust, happiness, anger, guilt, love of children, love of spouses, love of siblings, and so on. In the case of social emotions we have to look to another body of knowledge to make the argument, and very often is the analysis of inclusive fitness and reciprocity, which can be summed up in Richard Dawkins' metaphor of the selfish gene. Just as a gene for fear can be selected because it's less likely to end up at the bottom of a cliff, a gene for love of children can be selected because it's more likely to end up in the body of grandchildren, and therefore to end up with us today. He makes a number of points I completely agree with, such as that genes don't cause behavior in any linear or direct sense.