There is a common misconception among people, especially those raised outside of any kind of faith, that the government uses religion to control people, when in reality, IT IS QUITE THE REVERSE.
People use religion to control the government.
In order for a government to function, you have to have a group of people rallying behind an idea and willing forego comfort in order to uphold this ideal.
Religion, on the other hand, works in the oposite direction. It promises safety and ease under the guise of salvation and fullness of livelihood. Therefore, huge numbers of people rally behind these sets of ideals for security and safety. Then, when you have all of the people rallied behind these religious ideals, you out one of your people in office, thus bringing the majority of your followers with you.
So in essence, where government requires people to invest and sacrifice in an ideal, religion come with preinstalled followers who are already invested in the ideals of their head, and the head is merely plugged into the system of government.