Joshua is a charismatic leader of the people of God, he passed fifty years with Moses, learning from him relationships with God. All these fifty years, the book of the law travels with the people, and Joshua probably already knows it by heart. But nevertheless, God finds necessary to tell him the words we read today.
Apparently, it is not simply necessary to know the Holy Scriptures by heart, it is necessary to meditate it, that is to fathom its meaning, to be soaked in this meaning so that God's word won’t just be a book lying near, but rather an internal source of wisdom and the strength that brings success in the way, courage and faithfulness. More again: any study is focused on practical application of the received knowledge. It is also the same here, the reading of the Holy Scriptures is useless for the one, who perceives it "theoretically", and doesn’t endeavour to fulfill God's will.