There is no better way to control the people than by telling them that the rules and laws that you want them to follow are the words of God. Unseen, unheard but he will strike you down and condemn you to eternal suffering if you don't do what I say that God wants. It is still happening today. You can justify any ugly, despicable act or law, if you say it is the command of the imaginary God.
Laws and customs change.
Slavery - is as prevalent and as accepted today by the non-religious as by the religious. The only difference is, the slaves now get weekends off. You know, so they can pretend they’re not slaves and not be as likely to think about revolting. Oh, and they can, within certain limitations, choose their owners. Progress!
We are still subject to the laws our owners write. What we used to call religion, we now call “just how things are”. Our current religion is capitalism.