I think I remember that G-d warned His people against having a King, and also decreed that the King should live by the same laws as the people.
Moses warned about that way back in Devarim (Deuteronomy) 17:14-20, too. It was a foretelling of the events that would lead to the coronations of both the kings Saul and David. Take note of verse 15 especially.