God never intended for Israel to have kings. The people wanted it, and he allowed it. Just because you do something good, doesn't make it right, if it is not God's will.