God never intended there be poor people among Israel – but there were.
God never intended that Israel have a king – but He knew they would.
And so, in Deuteronomy 17, God laid down specific provisions for the life of a King.
First the king should be one God chooses. And yet, God choosing him was not a matter of God saying: “This is my king whom I have chosen.” If that were the case, the second command would have been unnecessary: the king was to be an Israelite.
How would one know that a King was approved by the Lord?
He might make it known by working mightily in His life (as in the case of Saul). Or he might make it known through a prophet (as in the case of David). But the sure way to know if a King was approved by God was in the way he behaved. He didn’t immerse himself in the materialism common to pagan kings. He didn’t make alliances with other nations. His libido must be held in check. Monarchs of the world might fall prey to these temptations, but those ruling the people of God should not. It was just another way of emphasizing “God’s people are not to be like everyone else.”