I think they used "the divine right of kings" to justify the idea of a
monarch to the population. Often religion was used to compel or rule the
masses. It still is. Because humans need to worship things -- and religion
is a way of expressing that need. It also brings people together.
Historically, many conqueors achieved their goals by sending missionaries
or co-opting the religion. That's what Rome did when it invaded the Celts.
It co-opted the religion and merged it with their own. One of the reasons
the ancient Hebrew were a problem for many of their rulers is they refused
to take on their rulers faith and their religion was harder to change or
The science fiction series Battle Star Galatica and Deep Space Nine both
explore how this is done, how if you can create or control someone's
religious beliefs or faith, you pretty much own them. (See The Holy Roman
Religion and politics have always been hand in glove. That's why the
founding fathers of the United States made a point to separate "church" and
"state" and create a secular government or state. It permits religious
freedom, but makes it impossible for someone to do what rulers were doing
in Europe for centuries. They wanted to ensure it didn't happen in the US
again as well. Smart move. Turkey did the same thing for a while, but I
think it's become non-secular again. And people are upset. Because
non-secular or a religious state is dangerous.
Now, there's the other side of course, which is a ban on all religion but
the state. In the Soviet Union and China and Nazi Germany, people had to
worship the religion of the state, whether that be the state itself (Nazi
Germany), or it's church. (Similar to Henry the VIII stating everyone in
England had to adopt the Church of England as their religion -- this
resulted in various upsets, but it was his way of controlling people.)
If you didn't, you were often put to death. Not unlike what happened during
the Spanish Inquisition and during the Holy Roman Empire's rule.
The problem religion has always had to some degree is people want to use it
obtain personal power or gain, and it's very easy to use in that way. Look
at Joel Olsteen, Rick Warren, Billy Graham, various televangelist,
Scientology (which is considered a religion - I see it as far right).