Under the Law of Moses, the king of Israel was to write for himself a copy of the Law, keep it with him, read and study it, so that he would revere God.
18 Also it shall be, when he sits on the throne of his rule, that he shall write for himself a copy of this second law in a book, from the one before the priests, the Levites. 19 It shall be with him, and he shall read it all the days of his life, that he may learn to fear the Lord his God and be careful to observe all these commandments and ordinances, 20 that his heart may not be lifted above his brethren, that he may not turn aside from the commandment to the right hand or to the left and may prolong his rule, he and his sons among the sons of Israel.Deuteronomy 17:18-20 OSB
As the leader goes, so goes the nation. Such was the case with ancient Israel.
Acknowledging this, GOD prepositioned Israel’s future kings for success by instructing them to write their own copy of the Law of Moses.
People retain more of what we learn through activity. By writing the Law himself, the king would increase his retention of its message. He would increase his focused attentiveness to its contents.
GOD is practical. The desired outcome was not memorization but drawing closer to GOD through a better understanding of who He is, His character, His expectations, His motives, and therefore His desired outcomes.
By understanding GOD’s desired outcomes, the king could better align himself with GOD’s will and serve GOD’s intended purpose, being blessed with the promises in the Law as a result.