Inherent in many spiritual traditions is the idea that the god to be worshipped most highly is he/she who created order from chaos. Isis is extolled as she who created the first laws and taught the Egyptians all the skills of civilisation. In similar fashion, many of the holy 'me' or divine attributes conferred upon the Great Sumerian Goddess Inanna deal with 'law and order'.
The old Vedic gods are deities who brought order and law to the world. Certainly the Iranian Zoroaster was a bringer of law and order to his people. Much of the Bible and Qur'an is filled with laws and regulations purportedly dictated to the prophets by Jehovah or Allah. Why is it that humanity worships those who, by regulating their lives, restrict their freedom of will?
There are a number of modern philosophers who have rebelled against the traditions that elevate Order above Chaos. Even so, it appears to me that there are two separate threads that run through religions. One is sociological, even political. The other is spiritual. I would suggest that all sociological and political concerns be divorced from our concept of divinity and that we recognise the fundamentally human nature of these concerns. Religion should be personal, not a means by which human beings seek to control other human beings.