Indeed.
Early anatomically modern humans had the capability to create mystical and fantastical stories connected to the things that were important to them: the sky, the seasons, the Sun, the Moon, the stars, plants, animals, other humans and their ancestors...
Myths and legends passed down through generations over thousands of years that evolved into cults and eventually religions.
Humans conditioned to believe in all-knowing gods or a god and that everything must have been created, controlled, and understood by higher powers or a higher power. As man realised the hold that could be held over people through religion, it was used to control the masses through their guilt-tripping fear-inducing mental slavery.
Abrahamic religions, Christianity specifically (which I know most about having gone to a Church of England Primary School), are the bastardisations of many much older Pagan religions. Every single Christian festival was stolen from long existing Pagan festivals. The entire Christian calendar overlaps with pre-existing Pagan festivals, and the pagan gods or legends from these festivals were adopted and amended by Christianity to make it easier to convert people.
There is no such thing as sin against devine law. Religion does not hold all the cards to morality. Non-believers and atheists have as much of a grip of humanistic morals as any well-meaning religious person.