To paraphrase the book of Genesis, in the beginning, God created the Earth and placed man in it to superintend it. Man multiplied and soon there was the need to form a government for life had become short, nasty, and brutish.
The government was to derive it's just power from the consent of the governed. Whenever there was an overwhelming feeling that the government had become destructive to the ends for which it was set up in the first place, that is to guarantee the safety and the happiness of the people, then it would have to be taught the fear of the Lord.