Actually it's a myth... or worse a Lie.
When those who wanted control they used God and religion to do it.
To make you behave you were promised outrages rewards, not in this life but in the one to come.
As a guarantee, just to make doubly sure you were good you were told that God sees everything and if you were bad you would spend eternity in the fires of everlasting Hell !
Pretty Sweet Deal.... since no one was ever likely to come back and contradict them... and so they got the power they sought in this world for a false promise.
The bit I can’t understand is why so many people today still fall for it....
Because if there truly is a God and he truly sees all then Heaven must be pretty empty and Hell must be stacked to the rafters.... for I seriously doubt there is one amongst us whose inner thoughts and intentions are pure enough to pass the test !