Leaders in all countries throughout history have always used religion to control and manipulate their people.
In Egypt, current thought is that temple priests were using tricks with acoustics and light to pretend to be the voice of Gods within temples.
In Rwanda, Catholic and Protestant churches helped to make the 1994 genocide possible by giving moral sanction to the killing. Churches had longed played ethnic politics themselves, favoring the Tutsi during the colonial period then switching allegiance to the Hutu after 1959, sending a message that ethnic discrimination was consistent with church teaching. The church leaders had close ties with the political leaders, and after the genocide began, the church leaders called on the population to support the new interim government, the very government supporting the genocide.
In India, in the name of religion, the caste system was justified and exploited by those in positions of power and authority. Their aim was to perpetrate the dominance of the priestly class and reduce competition to the ruling class in matters of political dominance.
When Religion mingles with Law, it becomes the vehicle for oppression, discrimination, and much worse. In our own country, many of the same people who condemn religious dominance and oppression in other countries, want Christianity to be law in the USA.