For many people – perhaps most people – religion and morality are inseparable. There are a great number of people who think of religion as the most important source of ethics and morals. There are even plenty of people who think that religion is, or should be, the only source of ethics and morals. This is a myopic, and rather unfortunate, line of thinking.
The great deal of importance that people have historically attributed to religions has led many, for millennia, to equate morality with adherence to dogmatic dicta. If not killing or stealing prevents some deity from taking a personal, negative interest in one’s life, then it would make sense to simply avoid such transgressions as much as possible. Seemingly for this reason, societies adopted religious codes such as the Ten Commandments as the basis for secular law. A fear of divine punishment can be a powerful motivating factor.
However, moral and ethical laws arguably do not even have their origins in religion. In terms of logic rather than faith, ancient man could see the harm that needless murder and theft could do to the group as a whole. Seeing that certain actions do more harm than good to the village/tribe/clan/what-have-you does not require divine inspiration, but simply rational thinking. Perhaps rational thinkers sought to tell others of the dangers of what we call criminal actions, but their arguments did not jell with the general populace. Instead of trying to spend much time explaining the sociological impact of certain actions, perhaps it was simply easier to say, “If you do this, God will spank you.”
Religion is not a necessary source of morals, certainly. In an organized society with a legal system, it is unnecessary to derive morality from religion. If it is a matter of punishment, parents and other authority figures can simply use the threat of legal recourse for criminal actions. While divine punishment is on a much grander scale, secular punishment is much more tangible, and therefore relevant.