Other nations had a king. Israel wanted to be like them and have a king too.
God knew that they were rejecting him as their ruler and were choosing to follow a human leader instead.