"Interestingly enough, the moral codes of the world's religions bear a striking resemblance to each other, with only minor variations. Religions as different as Hinduism, Islam, and Buddhism all have proscriptions against killing, lying, cheating, stealing, etc. This is not an accident, for reasons we shall explore below.
Christians may then object that that there is something unique about the Bible that makes it a superior moral code. Unfortunately for Christians, there is actually very little law in the Bible -- either Old Testament or New -- that is original. Consider the Torah of the ancient Jews. The laws of the Babylonians, Assyrians, Sumerians, Hammurapi, Eshnunna, Hittites, Mishnah, and Israelites all bear a striking resemblance to each other, due to widespread copying of laws. Shared social norms produced identical laws against sorcery, kidnapping, sale of an abducted person, false witness, business dishonesty, bribing judges, property right violations, shutting off irrigation canals used by others, etc. The complete list of identical laws and customs is quite extensive.
Nor is the New Testament's approach to the law unique. Most Christians can probably think of nothing more unique than the Apostle Paul's approach to the law, but any student of ancient Greece knows otherwise. Many of the themes that fill Paul's writings were lifted from his Greco-Roman background. During New Testament times, the Greco-Roman world was filled with Mystery Cults, sporting such names as Eluesinian Mysteries, the Orphic Mysteries, the Attis-Adonis Mysteries, the Isis-Osiris Mysteries, Mithraism, and many others. A common feature of these secret cults was a belief in a heroic redeemer, a heavenly being who would visit earth in human form, battle evil, die a sacrificial death, rise from the dead and ascend to heaven, offering salvation from death to all who follow him.
Another influence on the New Testament was Greek philosophy. In particular, Greek dualism taught that the world was sharply divided into opposites: good and evil, body and soul, man and woman, hot and cold, life and death, etc. Now, the Greeks from Plato on had taught that the body is evil, but the soul is pure. The ancient Jews had never believed this; they considered both the body and soul to be a masterwork of God's creation, which he had pronounced good. But Paul, taking a page from Plato, wrote: "This I say then, Walk in the Spirit, and ye shall not fulfill the lust of the flesh. For the flesh lusteth against the Spirit, and the Spirit against the flesh: and these are contrary the one to the other."
From this premise stems much of Paul's theology. The body is evil, lustful, imperfect and temporary. The soul is righteous, pure, perfect and eternal. It is through the soul that we achieve immortality; it is in heaven where we receive our rewards. Life on this earth is filled with biting misery; life in heaven is filled with eternal happiness. The law of man is corrupt; the law of God is just. Imperfect humans can never hope to obey the law; only the presence of God dwelling within a believer will enable him. All this was a dramatic break with Judaism, but it was quite consonant with Greek philosophy.
In sum, the moral code of the Bible finds its roots in the civilizations and cultures that surrounded it, and can hardly be called unique, much less the basis of all morality. In fact, similarities around the world suggest that morality is a universal trait among humans, for reasons that philosophers argue.
One school of moral theory holds that morality is a function of group survival. Group survival is superior to individual survival; that is why true hermitism is so rare. (Even conservatives and libertarians agree that interdependent, specialized groups make for greater prosperity; they just disagree with liberals on how to conduct this group effort.) Therefore, anything that ruins the cooperation and cohesion of the group is to be condemned. Since killing, lying, cheating, and stealing against members within the group destroys group cohesion, it is therefore considered immoral, and punished by law.
On the other hand, killing, lying, cheating and stealing against those outside the group may actually promote survival, and therefore can be considered moral, even heroic behavior. That is why, despite a commandment prohibiting killing, God often commanded Israel to kill her enemies. The critical question is whether the target of the action is inside or outside the group.
And how do people draw the lines of their group? Intellectually. People decide which groups they belong to, and determine their moral behavior from there. True, genetic factors may figure into their decision where to draw their lines; white supremacists consider only white people to be part of their group. But there are also many white liberals who consider Martin Luther King to be a member of their group far more than Adolf Hitler. The decision is ultimately an intellectual one.
Interestingly, the larger one draws the line of one's group, the more noble the morality. Mahatma Gandhi considered the entire world to be in his group. Jesus said "Love your enemies." On the other hand, the smaller the group, the lesser the morality. Criminals often identify with groups that are no larger than themselves or a few partners in crime. Consequently, they feel no need to display moral behavior towards anyone outside their group. Judges are often heard to remark upon the remorselessness of some criminals. But it's not true that criminals have no moral code; they just exercise it on a far smaller group."