TT #111 · Parashas Shoftim · Second Aliyah · Passuk 17:19
And it shall be with him, and he shall read in it all the days of his life, so that he may learn to fear the Eternal his God, to keep all the words of this Torah and these statutes, to do them.
Torah Temimah points to Sifrei Devarim 161.
TT lemma: לְמַעַן יִלְמַד לְיִרְאָה.
English: ‘So that he may learn to fear the Eternal his God’ – for reading leads to fear, and fear leads to observance.
Derash on the educational sequence (Sifrei) — the purpose of constant reading is to produce yiras Shamayim and then practical observance.
Constant reading of the Torah is the means by which the king acquires fear of Heaven, which in turn leads him to keep the commandments.