“Pre-Christian religions did concern themselves with morality. Egyptians believed over 4000 years ago that the soul would be judged. But prehistoric hunter-gatherer religions did not concern themselves with sexual morality, since for them the paternity of a child did not matter.
“When people settled and men amassed goods and assets- – which they wanted to benefit their true offspring, not potential cuckoos in the nest – – women then had to be forced into monogamy. Hence honour killings, child marriage, female genital mutilation… all in the name of religion. Morality-based religions were invented by men to control women. If it ever happens, true male-female equality, not evolution, will cause moralising religions to vanish. (From Valerie Moyses, Bloxham, UK, New Scientist, June 2016)
Another point of view, from Roderick Ramage:
The philosopher Montesquieu addressed Baumard’s subject in his 1716 essay on Roman politics in religion. He wrote that “when the Roman legislators established religion, they were not thinking at all of the reformation of customs, nor of laying down moral principles; they had no wish to inconvenience a people whom they hardly knew any more. They had from the very first but one general aim, which was to inspire in a people (who feared nothing) fear of the gods, and to make use of this fear…” (Roderick Ramage, Coppenhall, Staffordshire, UK)
Machiavelli certainty recommended that the ideal Prince should use religion to control the people. Hobbes largely concured with this analysis, arguing for one state sanctioned religion. But neither thinker seemed particularly religious themselves; Machiavelli said that the Prince should not be religious himself, Hobbes rejected arguments for absolutism based on the Divine Right of Kings.
Both thinkers got it right. Religion can be a very effectice use of control. This is why secularism is so fundamental to a free society, it prevents government from using religion to dictate people’s behaviour. It’s no surprise that the liberal revolutions in America and France argued against both absolutism and theocracy, because the two very often come hand in hand. Or else you get what Iran has now- where the highly corrupt Ayatollahs hold power, and force an Islamist rule on what is a surprisingly secular population.