I suspect there are two things that come into play, providentially, when God assigns us a ruler.
- the image of the people
- the maturity of the people
Allow me to explain. We probably wish that our rulers be elected based on their qualifications and fidelity, fidelity to justice, to commitments, to principles, to the Constitution, etc. That the ruler, once elected, then leads the nation according to his qualifications and fidelity, making the nation either great or not (depending on the degree to which he is qualified and faithful or not). In other words, we think the ruler makes the nation in his image.
It is more likely, I suspect, that–in America, at least–the people elect a ruler, not based on his qualifications and fidelity, but based on their image. We create a ruler in our image, electing the ruler who will rule according to our wants, desires, lusts, ideologies, and principles (or lack thereof).
I say this happens in America, at least, because I don’t think that was the case in ancient Israel. Kings were anointed primarily based on the laws of succession, not the will of the people. In that arrangement, it was more likely that a good king would lead the nation toward the good, and a bad king would lead the nation toward the bad. In fact, this is exactly what we see with good kings like Hezekiah and Josiah, and with bad kings like Ahab and Manasseh.
In America, though, we elect rulers in our image. We get what we are.
Likewise with the second argument: the maturity of the people. Egypt was an immature nation. Pharaoh has a dream that none can interpret; Joseph interprets it. Joseph then tells him how to plan as a result of the dream, something the Pharaoh acknowledges no other in the land could do. Egypt, in its immaturity, lacked wisdom. Joseph is installed as the Pharaoh’s right-hand man to lead the nation through plenty and famine. What Joseph proceeds to do is shocking to Christian conservatives and libertarians alike. He leads the country into socialism. During the years of plenty, he taxes the people from their grain and crops. During the years of famine, he sells back for money what he took from them without payment. He does so to the point where they end up selling him their cattle, homes, and property in order to eat. The government ends up owning everything (except for the church–the property of the priests, coincidentally). Joseph ruled an immature and unwise nation the way it needed to be ruled.
If we are unwilling to live with freedom–and the great responsibility that brings–then God is going to give us rulers who will not allow us to have that freedom. We will be given the rulers our maturity and wisdom demands or allows. We do the same with our children, don’t we? When they are young, lacking maturity and wisdom, our rules are stricter (tyrannical by a teenager’s standards). As they mature, we give them more freedom. Sometimes, we have one child who earns freedom that our other child, at that same age, has not matured into. It seems we have not only elected a president made in our image (again), but we have elected a president who will take away the freedoms we don’t even want, that we haven’t matured into. God is sovereign. Maybe we should start with repentance and teaching our children how to live with the responsibility of freedom.
 Jordan, James B. Primeval Saints. Canon Press, 2001, pgs. 141-149. James Jordan explains much more clearly what I have muddled through here, regarding ruling the mature or immature.