The "Code of Hammurabi" has been considered to be a moral code prior to the Decalogue but of course societies have, in the main, conduct rules which could carry an amount of punishment if crossed.
There is and was a moral cosmic tone which permeates the human soul throughout the ages but the Decalogue was different in the sense that the ancient Hebrew displayed the beginnings of an "individualization" in this code which was brought forth from higher realms.
The Decalogue speaks to conduct which works external nature, the world, . The commandment which speaks to "false gods" highlights this as these "gods" come from within the man whereas the ancient Hebrew was subscribed to "work the earth " and look to the "God of Nature" or the "Father God".
The Decalogue is about the "external" of man. This work was "heaven sent" or of a spiritual reality obtained through inspiration via Moses , the great initiate.
During ancient times there was an "atavistic clairvoyance" throughout people(s) to which leaders could and would bring happenings from the suprasensible realm for the functioning of the culture; the Egyptian Pharaohs could, through great seers, prescribe the cultural mores and in fact the warp and woof of the culture in and of itself.
The oft noted brutality of the Hebrew peoples in ancient war came about by inspiration from above as they were led by a higher realm to their accomplishments. One can say that "the ancient cultures", through this "atavistic clairvoyance" did deeds to which we, in our times, would consider poor form but in fact was ennobling within the exegesis of those times.
Getting to the point; the individual man was not spiritually individual, for want of a better word, as he was, in a sense, "guided" to these deeds and therefore the idea of "sin" was not germane for "sin" lies within the individual who is responsible for his acts and so long as this "atavistic consciousness" reigned, man was spared the knowledge of "good and evil" within his particular individuality. His responsibility was marginal and of course there were outliers.
The concept of "Ego" or "I" comes to the fore as many may see this as no more than a word, perhaps, Freudian, but none the less more like one who is "egotistical" or only acts within himself; the pejorative.
Aphoristically the "Ego" or "I" is the "God Within", the "Kyrios" , or even the "Lord" who is a "Body of Man". Just as we have a "physical body", a "life body", "a sentient body" we have the "Ego" as another, of the highest of Man. the "Ego" lives in the high spiritual realms and works through the other bodies to the earth and cosmos ion the development of the human soul.
The "Ego" is also the "baby" body for it first came to Man during the earth evolution whereas the other bodies were developed during previous incarnations which led to the earthly.
The "Ego" is that which leads man through "good and evil" as noted in the Old Testament with the story of Adam and Eve and of course Lucifer. The "Ego" came to man and the earthly at that time, Man renewed.Subsequently and through the ages there was a gradual loosening of the "Ego" from the suprasensible in that it was masked due to the gradual development of the human soul.
At around the time of Golgotha human beings had "crashed" to the earthly which means that the suprasensible was being totally lost to the human soul and the Christ Being came, at the perfect time, entered into the body of Jesus of Nazareth, lived as human for three years (3), died on the cross as human being and entered into the earth as the "Spirit of the Earth", sitting in the hearts of "all men".
Christ, the spiritual Guide or Template into the future of the redemption of the human soul'; not as "commandment" for Love does not come through coercion but Love is within freedom. The human being, in futuristic, manifests "freedom" as the word may be stated as "freehood" within Love manifest.
And so when a man states responsibility for his moral tone it is exactly what it is and the work of the individual man. His "Ego", immersed within 'good and evil" works within the template or the guide into the future of recurrent lives. He is within "religion" which is the return to the "spiritual world", as known by the ancients, but the "return" is refurbished man a divine being of births and deaths; the "Spirit Man" a work in progress.
Just to be clear, the religions as we know them, were brought forth by great "seers" for our replenishment and can offer sustenence as the individual man who works for his future state of being.