who was the old testament law written for
Old Testament The Old Testament stresses the special relationship between God and his chosen people, Israel, but includes instructions for proselytes as well. This relationship is expressed in the biblical covenant (contract) between the two, received by Moses. The law codes in books such as Exodus and especially Deuteronomy are the terms of the contract: Israel swears faithfulness to God, and God swears to be Israel's special protector and supporter.[14]
Josiah According to the Hebrew Bible, in the eighteenth year of his rule, Josiah ordered the High Priest Hilkiah to use the tax money which had been collected over the years to renovate the temple. It was during this time that Hilkiah discovered the Book of the Law. While Hilkiah was clearing the treasure room of the Temple he discovered a scroll described as "the book of the Law"[7] or as "the book of the law of Yahweh by the hand of Moses". The phrase "the book of the Torah" (ספר התורה, sefer ha-torah) in 2 Kings 22:8 is identical to the phrase used in Joshua 1:8 and 8:34 to describe the sacred writings that Joshua had received from Moses. The book is not identified in the text as the Torah and many scholars believe this was either a copy of the Book of Deuteronomy or a text that became a part of Deuteronomy.[14]