Following Aristotle, Aquinas makes exactly this point. Even those philosophers like Kierkegaard who are often called "irrationalists," assume this very basic drive. For Kierkegaard--following Kant and Socrates in some ways--there's a higher ethics that characterizes religious ethics. This higher ethics is distinctly opposed to natural inclinations, calling into play a higher sense of purpose than common desires for biological, social, or political ethics entail. ...
According to NYTimes:
The moral grammar now universal among people presumably evolved to its final shape during the hunter-gatherer phase of the human past, before the dispersal from the ancestral homeland in northeast Africa some 50,000 years ago. This may be why events before our eyes carry far greater moral weight than happenings far away, Dr. Hauser believes, since in those days one never had to care about people remote from one’s environment.
Dr. Hauser believes that the moral grammar may have evolved through the evolutionary mechanism known as group selection. A group bound by altruism toward its members and rigorous discouragement of cheaters would be more likely to prevail over a less cohesive society, so genes for moral grammar would become more common.
Many evolutionary biologists frown on the idea of group selection, noting that genes cannot become more frequent unless they benefit the individual who carries them, and a person who contributes altruistically to people not related to him will reduce his own fitness and leave fewer offspring.
But though group selection has not been proved to occur in animals, Dr. Hauser believes that it may have operated in people because of their greater social conformity and willingness to punish or ostracize those who disobey moral codes.
“That permits strong group cohesion you don’t see in other animals, which may make for group selection,” he said.