It is the Rambam's 8th Principle of Faith that the entire Torah (possibly except the last several verses) was dictated by God to Moses. Why do we believe that? Why, for example, can't we say that the book of Genesis was written by Jacob, for example, and has the level of holiness and authenticity as a book of the Prophets? Perhaps the forefathers had those scriptures before Moses, and they were canonized with the rest of the Torah as a prequel? Not that they are not holy writings, but why do we have to say that Genesis was written by Moses?
Or, for example, in the last few chapters of Deuteronomy, there are discussions of Moses concluding the writing of the Torah and putting it for safekeeping among other events that would make more sense as an addendum but not as part of the Torah discussed there. Why can't we say it's included with the Torah as an addendum but not that God told that part to Moses?
Is it simply because by the time of the Gemara it was a relatively central and widespread belief, and, in the absence of any major compelling reason to say otherwise, that became recognized as a core belief?
Edit: I know that the Torah includes phrasing like "this entire book of the Torah," which the Torah says was given to the Jewish people by God through Moses. I am not asking how we know that is true. I am asking why we have to say that what we currently consider the Torah doesn't include prophetic prequels or addenda beyond what was given at Sinai.
eg devarim 1:1That's the classic counterexample I had in mind when writing the above comments. D'varim is in some ways a book apart from the previous four books of the Pentateuch insofar as it primarily consists of Moshe's speech that he originally innovated (see, for e.g., M'gilla 31b) through Divine inspiration (Tosafos ad loc., s.v. "Moshe") before HaShem commanded him to include it in the Torah. The expression "משנה התורה" (Deut. 17:18) is frequently (albeit not universally) understood as a reference to Deuteronomy's inclusion as an addendum to the Pentateuch. – Fred Dec 11 '22 at 19:45