Haven't I commanded you? Be strong and of good courage; don't be afraid, neither be dismayed: for Yahweh your God is with you wherever you go.
Josiah's reforms led to a popular observance of the sabbath, and of the Passover, (2 Kings 23:22).  How did they know how to keep such laws?  Where else but in the Pentateuch could the instructions be found?