The reason a moralizing god is important and those religions win is darwinian in a way -- a moralizing god lets the priests or the leaders of the religion control people more efficiently. They can convince people that god is watching them if they are mean, naughty, have bad thoughts, even when the priests are not there.
It is the total surveilance society before the surveilance society was a thing.
That allows mobilization and control of larger groups of people.
And although it sounds kind of mean and critical, it also allowed and generated a lot of nice things -- co-operation, altruism (one can argue forced altruism, "god said, be nice to your neighbor Jimmy, or you'll burn in hell forever! -- Erm..., ok, will do definitely" might not be a true altruism, but that is a different discussion), it allowed for the care of the sick, etc...
It is the total surveilance society before the surveilance society was a thing.
That allows mobilization and control of larger groups of people.
And although it sounds kind of mean and critical, it also allowed and generated a lot of nice things -- co-operation, altruism (one can argue forced altruism, "god said, be nice to your neighbor Jimmy, or you'll burn in hell forever! -- Erm..., ok, will do definitely" might not be a true altruism, but that is a different discussion), it allowed for the care of the sick, etc...