Israel was not to have a king because Yahweh was their king. Knowing the sinfulness of the people, Yahweh anticipated that one day Israel would have a king. Therefore, this passage gives commands about their king prophetically. They were not allowed to collect chariots because they were a sign of earthly power and the king was to trust in Yahweh. (See 1 Samuel 8).