כשמגביהים את הספר תורה אומרים:
וְזאת הַתּורָה אֲשֶׁר שם משֶׁה לִפְנֵי בְּנֵי יִשרָאֵל. עַל פִּי ה' בְּיַד משֶׁה:
...When they raise the Torah scroll, they say:
And this is the Torah which Moses set before the children of Israel, upon the word of God through the hand of Moses.
(5) וימת שם משה And Moses died there — Is it possible that Moses died, and wrote: “And Moses died there”? But rather, Moses wrote up to here; from here and onward Joshua wrote. Rabbi Meir said: But is it possible that the Book of the Torah could be lacking anything at all [when it was given]?! For it states [before the account of Moses' death was written in it (Deuteronomy 31:26)] “Take this book of the Torah”? Rather the Holy One, blessed be He, dictated this, and Moses wrote it in tears (Sifrei Devarim 357:28; Bava Batra 15a, Menachot 30a).
(ה) וימת שם משה. ...ואחז"ל שמונה פסוקים הללו יחיד קורא אותן ותימא שהרי גם כל הפרשיות שבתורה אמרינן במס' מגילה אחד קורא ולא שנים ומה שנהגו עתה לקרוא שנים הקורא והחזן אנו סומכין על מה ששנינו במסכת בכורים בתחלה כל שהיה יודע לקרות קורא ומי שאינו יודע לקרות מקרין לו והיו מתביישין התקינו שיהו מקרין הכל והכי נמי בהני שמונה פסוקים השליח צבור מקריא עם הכל:
(5) וימת שם משה, “Moses died there.” ... And our sages (of blessed memory) said that these eight verses were to be read by a solitary reader. But you say that, see, for all the passages of the Torah, we say in Tractate Megillah [of the Talmud Bavli] that a solitary person reads them, and not two together. What they are accustomed to do now - to read with two, the reader and the chazzan - for that, we rely upon what we learned in Tractate Bechorim: At first, anyone who knew how to read would read, and for one who didn't know how to read, they would read for that person. But this would embarrass that person; therefore they established that they would read for everyone. And this they also do for these eight verses - that the Sheliach Tzibbur would read them for everyone.
(א) ויאמר. פסל לך. כמו לך לך. ואתה קח לך וטעם כראשונים. כמדתם. אמר הגאון כי השניים נכבדים מהראשונים כי השניים נתנו ביום קדש וביום הכפורים ולא כן הראשונים. כי הם ירדו ביום י''ז בתמוז וביום חול. ויש עם השניים זכר שלש בריתות ובשניי' כתוב ולמען ייטב לך.והראשונים נשתברו ואלה כדברי חלום לא מעלין ולא מורידין. כי מכתב אלקים היו שניהם ועוד כי הראשונים הם מעשה אלקים. והשניים מעשה משה
...And He said: Carve yourself...Like [the expressions] Go for yourself (Genesis 12:1). And you take for yourself (Genesis 6:21) - the explanation is [that they should be] similar to the first, similar in their quality. The Gaon said that the second [tablets] were more honoured than the first, for the second were given on a holy day [i.e., Shabbat] and on Yom ha-Kipurim, and not so for the first, for they came down on 17th of Tammuz and on a weekday. And with the second set there was a mention of the three covenants, and with the second it was written: That it may be good for you (Deuteronomy 5:15). And the first were shattered, but these [tablets] are like matters in a dream that neither elevate or reduce [cf. Tr. Sanhedrin 30a]. For both were written by God, and further the first were the handiwork of God but the second were the handiwork of Moses.
(א) וכתבתי על הלחת את הדברים... והכי איתא ג״כ בש״ר פמ״ז הה״ד טוב לי כי עניתי למען אלמד חקיך לטובתו של משה נתענה ק״ך יום כו׳ אמר הקב״ה נצטערת חייך שאין אתה מפסיד. בלוחות הראשונות לא היה אלא עשרת הדברות ועכשיו שנצטערת אני נותן לך מדרש הלכות ואגדות ... והכוונה בכ״ז דבלוחות הראשונות לא ניתן כח החידוש אלא מה שקיבל משה דיוקי המקראות והלכות היוצא מזה אבל לא לחדש דבר הלכה ע״י י״ג מדות וכדומה הויות התלמוד. ולא הי׳ תורה שבע״פ אלא דברים המקובלים מפי משה ומה שלא היה מקובל היו מדמים מילתא למילתא. אבל בלוחות השניות ניתן כח לכל תלמיד ותיק לחדש הלכה ע״פ המדות והתלמוד... ומזה הטעם עצמו צוה הקב״ה שיהיה הלוחות השניים בפיסול ידי משה לא משום שלא זכו למעשה אלקים אלא להורות דהלכה המתחדשת בכח לוחות הללו היא השתתפות עמל האדם בסיעתא דשמיא כמו עצם הלוחות שהיה מעשה משה וכתיבת הקב״ה.... והיינו מה שאמרו חז״ל דאפי׳ מה שתלמיד ותיק עתיד לחדש הי׳ בלוחות. והכונה שבכח לוחות השניות היה נכלל הכל . וכ״ז דברי גאון. דבזה הפרט הי׳ לוחות שניות מכובדים מן הראשונות.
...And I will write the words upon the tablets...
And this appears also in Shmot Rabbah Ch. 47, concerning the words: It was good for me that I suffered, so that I could learn your statutes (Psalms 119:71). [Moses] fasted 120 days for Moses' own good, etc. The Holy One (blessed be He) said: You have suffered! By your life, you will not lose thereby. In the first tablets, there was only the Aseret ha-Dibrot and now that you have suffered, I will give you the midrash halachot and agadot....
And the intention of all this was that in the first tablets, the power of innovation was not given, but rather only what Moses received as the particulars of the texts and the halachot that emerged from them, but not to innovate a matter of halachah through the Thirteen Principles [of R. Yishmael] and similar Talmudic arguments. And there was no Oral Torah except for ideas received from the mouth of Moses and anything that was not thus received came from comparing one matter to another.
But with the second tablets, to every distinguished student there was given the power to innovate halachah with the [thirteen] principles and the Talmud.... And for this very reason the Holy One (blessed be He) commanded that the second tablets were to be carved by the hands of Moses - not because they didn't merit God's handiwork, but rather to teach that the halachah would be renewed through the power of these tablets, which is the partnership of human endeavour with the aid of the heavens, just as the essence of these tablets was the handiwork of Moses and the writing of the Holy One (blessed be He)...
And therefore we understand what our sages (of blessed memory) said - that even what a distinguished student would innovate in the future was in the tablets. And the intent was that all was included in the power of the second tablets. And all of this was according to the words of the Ga'on. For in this is the particulars of why the second tablets were more honoured than the first.
(לב) את כל אשר דבר ה׳ אתו בהר סיני כל המצות שנאמרו במ׳ יום ראשונים ובמ׳ יום אחרונים וכל המצוות שנצטוו ישראל נאמרו מניסן שבו יצאו ישראל ממצרים עד עשרים באייר בשנה השנית, אבל התורה מגלה נתנה שלפי שהיה משה שומע המצות מפי הקב״ה היה כותב כל אחת ואחת במגלתה לעצמה, וכשבא ליפטר מן העולם סידר ספר תורה וקבע בו הפרשיות עד היום הזה לפי הסמוכין הראויין להם כמו שדרשו רבותינו.
(32) את כל אשר דבר ה' אתו בהר סיני, all that G-d had spoken to him on Mount Sinai...
All the commandments that were said in the first 40 days and in the last 40 days, and all the commandments that were commanded to Israel were said from Nissan when Israel went out of Egypt until the twentieth of Iyar in the second year. However, as for the Torah in scroll form, as Moshe heard the commandments from the mouth of the Holy One (blessed be He) he would write each and every one in its own scroll. When Moses came to leave this world, he placed the Sefer Torah in order and established its sections [lasting] until today, according to the connections appropriate for them, as our rabbis have expounded.
http://www.haaretz.com/jewish/features/.premium-1.657492
http://www.aishdas.org/toratemet/en_cardozo.html
Actually, the whole question of how to look at such issues in the Biblical text is not a uniquely modern one. The Talmud (Berachot 10a)4 encapsulates the concern through a brief discussion between R. Abahu and an anonymous Sadducee. It is well known that the Sadducees were enamored with Greek (i.e., rational) thought, so it is no coincidence that this one expected the Bible to be in strict chronological order. Hence, when the Sadducee cites an example of the Psalms being out of order, R. Abahu responds by saying that this is only a problem for you (i.e., based on your assumptions). We, however, says R. Abahu, view the order of the Torah as not purely chronological but also associational (semuchin min haTorah). Jewish tradition posits that the Torah is organized according to the relationship between the content or theme of one section and that which follows it.5 So, it is not only legitimate for the Torah to be “out of order,” it is to be expected. More generally, R. Abahu was suggesting that there really can be order in “disorder.”