When reading through 1 Kings 6:11-13 I noticed something I hadn't seen before. The passage reads, "Now the word of the LORD came to Solomon, Concerning this house that you are building, if you will walk in my statutes and obey my rules and keep all my commandments and walk in them, then I will establish my word with you, which I spoke to David your father. And I will dwell among the children of Israel and will not forsake my people Israel."
Back in Exodus when the Old Covenant was ratified, it was clearly between God and the nation. They agreed to the terms and they were sprinkled with blood and God told them that they would suffer the consequences if they didn't obey and they would reap the blessings if they did. In the above passage Solomon the third king of Israel is told that if he obeys the laws of God that God will dwell among the people. I might not have thought too much about this except for something I learned way back in high school while in Old Testament Survey, (I went to a Christian School).
We had to learn all the names of the kings of both Israel and Judah and what happened during some of their reigns. Probably the most obvious thing we saw was that if a king was good, he obeyed the terms of the covenant and strangely enough so did the people; if he was evil he led the people into disobedience. Israel never had a good king and so the people went immediately into idolatry and stayed there. Judah had some kings who obeyed and some who did not and under the good kings the people generally did what was right concerning the covenant and under the evil kings they, without exception, did what was evil.
Now to understand what is going on here you have to remember that we are speaking of Israel under the Old Covenant. The Remnant were those true believers that loved God and served him regardless of what was going on in the nation around them. But mostly Israel was composed of unbelievers who were doing whatever they wanted to. We also must remember that the Old Covenant was part and parcel with Israel's politics as well as it's religion. It controlled their civil laws as well as the laws of the Temple. So whoever was king could effectively enforce whether Israel as a nation would obey the terms of the covenant or not. If a king wanted to establish idolatry he could do that and make it difficult for those who did not participate and could be favorable to those who did.
My point is that when Israel asked for a king and God said that they were rejecting him by doing so, they were in effect asking for a mediator; someone who would rule them rather than God. They wanted to allow him to rule the nation rather than God and it seems to me that by granting them their wish God establishes the king as Representative or Federal Head for the people. They are still responsible to obey and they will suffer the consequences but God will let the king be the representative and as he goes, so goes the nation.
Under the judges the people pretty much ruled themselves and that didn't work out too well because by the time of Samuel and Saul they were doing whatever seemed good in their eyes which translated meant they mostly didn't keep the covenant with God. So perhaps by letting a king rule them they might do better. But while it served them well at times, by and large the result was the same and God finally says enough is enough and promises that he will establish a better covenant.
And so in 1 Kings 6 I see a foreshadowing of Christ who said, "Come to me, all who labor and are heavy laden, and I will give you rest." If we are left to our own devices we have no hope of obeying God. In fact we are told that there are none who does good and sins not. The Old Testament is one big object lesson that man cannot obey God, let along earn salvation. But those who come under the rule of the Lord Jesus Christ have found One who is able to perfectly keep the Law of God. This is the essence of the New Covenant. We are no more able to obey God than they were in the Old Testament but God has given us a king who will please God in all things and told him that all who are in this kingdom He will dwell with forever! Thank God that we have a mediator who is much greater than the kings of the Old Testament.
Even Jesus tells us as much, Mat 12:42 "The queen of the South will rise up at the judgment with this generation and condemn it, for she came from the ends of the earth to hear the wisdom of Solomon, and behold, something greater than Solomon is here."