I had that experience when I realized who Ezra HaSofer ("the scribe") probably was. We were taught that he was called "the scribe" because, you know, he was a scribe. He copied Torahs; he even made a couple of small corrections, according to some of the sages.
What an understatement! He wasn't Ezra HaSofer; he was Ezra HaSOFER! He didn't correct a few errors; he basically compiled/wrote (redacted) what we now call the Torah!
In hindsight, everything makes sense. There were so many clues.
First of all, a plain reading of Nechemiya (Nehemia) 8 implies that Ezra revealed a Torah which was at least partially new to the people:
1 all the people gathered themselves together as one man into the broad place that was before the water gate; and they spoke unto Ezra the scribe to bring the book of the Law of Moses, which HaShem had commanded to Israel.
2 And Ezra the priest brought the Law before the congregation, both men and women, and all that could hear with understanding, upon the first day of the seventh month.
3 And he read therein before the broad place that was before the water gate from early morning until midday, in the presence of the men and the women, and of those that could understand; and the ears of all the people were attentive unto the book of the Law...
5 And Ezra opened the book in the sight of all the people--for he was above all the people--and when he opened it, all the people stood up.
6 And Ezra blessed HaShem, the great G-d. And all the people answered: 'Amen, Amen', with the lifting up of their hands; and they bowed their heads, and fell down before HaShem with their faces to the ground...
8 And they read in the book, in the Law of G-d, distinctly; and they gave the sense, and caused them to understand the reading.
9 And Nehemiah, who was the Tirshatha, and Ezra the priest the scribe, and the Levites that taught the people, said unto all the people: 'This day is holy unto HaShem your G-d; mourn not, nor weep.' For all the people wept, when they heard the words of the Law...
12 And all the people went their way to eat, and to drink, and to send portions, and to make great mirth, because they had understood the words that were declared unto them.
13 And on the second day were gathered together the heads of fathers' houses of all the people, the priests, and the Levites, unto Ezra the scribe, even to give attention to the words of the Law.
14 And they found written in the Law, how that HaShem had commanded by Moses, that the children of Israel should dwell in booths in the feast of the seventh month;
15 and that they should publish and proclaim in all their cities, and in Jerusalem, saying: 'Go forth unto the mount, and fetch olive branches, and branches of wild olive, and myrtle branches, and palm branches, and branches of thick trees, to make booths, as it is written.'
16 So the people went forth, and brought them, and made themselves booths, every one upon the roof of his house, and in their courts, and in the courts of the house of G-d, and in the broad place of the water gate, and in the broad place of the gate of Ephraim.
17 And all the congregation of them that were come back out of the captivity made booths, and dwelt in the booths; for since the days of Joshua the son of Nun unto that day had not the children of Israel done so. And there was very great gladness.
18 Also day by day, from the first day unto the last day, he read in the book of the Law of G-d. And they kept the feast seven days; and on the eighth day was a solemn assembly, according unto the ordinance. (JPS)
They had never celebrated Sukkot (The Feast of Booths) in that country! ("Since the days of Joshua.") Apologists will tell you that the people had simply forgotten the Torah and Ezra was bringing it back to them. However, Richard Friedman points out that in Leviticus 23, the laws for Sukkot seem to be added on to the list of holidays. The list goes from verses 4-37 and ends, "These are the holidays of Hashem." Then, two verses later, it suddenly starts listing the laws of Sukkot. This makes sense in hindsight. Combined with evidence (Neh 8:17, above) that Sukkot wasn't celebrated until Ezra showed up with the Torah, it seems reasonable that Ezra added those verses to an earlier text when he redacted the Torah.
(Friedman brings many more arguments in support of Ezra being the redactor. For example, he points out that this is the first time in all of Tanakh that a finished copy of the Five Books appears. See Who Wrote the Bible for more.)
Second, there is evidence within the Torah that (at least) parts of it were written long after Moses' time:
So Moses the servant of HaShem died there in the land of Moab, according to the word of HaShem. And he was buried in the valley in the land of Moab over against Beth-peor; and no man knoweth of his sepulchre unto this day. (Deuteronomy 6:34)
And there hath not arisen a prophet since in Israel like unto Moses, whom HaShem knew face to face. (Deuteronomy 34:10)
These were the kings who reigned in the land of Edom before there was any king reigning over the descendants of Yisrael. (Gen. 36:31)
And when Abram heard that his brother was taken captive, he led forth his trained men, born in his house, three hundred and eighteen, and pursued as far as Dan. (Genesis 14:14)
As this article points out, "no man knoweth of his sepulchre unto this day" doesn't make sense if it was written during Moses' time; "And there hath not arisen a prophet since" has the same problem; "before there was any king reigning over the descendants of Yisrael" makes no sense before King Saul's reign; and "Dan" wasn't named "Dan" until long after Moses' death (Judges 18:29.)
The Jewish Tradition
Although obviously the Jewish tradition has Ezra making some minor edits at the most, there are some remnants of Ezra's real importance to the Torah. The Talmud, for example, compares him favorably with Moses himself.
In the Talmud, it says:
It has been taught: R. Jose said: Had Moses not preceded him, Ezra would have been worthy of receiving the Torah for Israel. Of Moses it is written, And Moses went up unto God, and of Ezra it is written, He, Ezra, went up from Babylon. As the going up of the former refers to the [receiving of the] Law, so does the going up of the latter. Concerning Moses, it is stated: And the Lord commanded me at that time to teach you statutes and judgments; and concerning Ezra, it is stated: For Ezra had prepared his heart to expound the law of the Lord [his God] to do it and to teach Israel statutes and judgments. And even though the Torah was not given through him, its writing was changed through him, as it is written: And the writing of the letter was written in the Aramaic character and interpreted into the Aramaic [tongue]. And again it is written, And they could not read the writing nor make known to the king the interpretation thereof. Further, it is written: And he shall write the copy [mishneh] of this law, Â— in writing which was destined to be changed. --Sanhedrin (21b - 22a)
Other Sources of Evidence
There is also evidence from outside of the mainstream Jewish tradition that people believed Ezra wrote or redacted the Torah as early as the 1st century CE. Ezra 4 (otherwise known as 2 Esdras, which is "Ezra" in Latin) was written in the 1st or 2nd century. (Ezra 1 & 2 are Ezra and Nehemia.) Although it's not in the Jewish Tanakh or accepted by most Christians as scriptural, "the Ethiopian Orthodox and Russian Orthodox consider it canonical." (Wikipedia.)
Ezra 4 is a truly fascinating book. According to it, the original Torah was burned up in the fire that destroyed the first Temple. God appears in a bush and re-teaches the Torah to Ezra:
1: And it came to pass upon the third day, I sat under an oak, and, behold, there came a voice out of a bush over against me, and said, Esdras, Esdras.
2: And I said, Here am I, Lord And I stood up upon my feet.
3: Then said he unto me, In the bush I did manifestly reveal myself unto Moses, and talked with him, when my people served in Egypt...
19: Then answered I before thee, and said,
20: Behold, Lord, I will go, as thou hast commanded me, and reprove the people which are present: but they that shall be born afterward, who shall admonish them? thus the world is set in darkness, and they that dwell therein are without light.
21: For thy law is burnt, therefore no man knoweth the things that are done of thee, or the work that shall begin.
22: But if I have found grace before thee, send the Holy Ghost into me, and I shall write all that hath been done in the world since the beginning, which were written in thy law, that men may find thy path, and that they which will live in the latter days may live.
23: And he answered me, saying, Go thy way, gather the people together, and say unto them, that they seek thee not for forty days.
24: But look thou prepare thee many box trees, and take with thee Sarea, Dabria, Selemia, Ecanus, and Asiel, these five which are ready to write swiftly;
25: And come hither, and I shall light a candle of understanding in thine heart, which shall not be put out, till the things be performed which thou shalt begin to write.
26: And when thou hast done, some things shalt thou publish, and some things shalt thou shew secretly to the wise: to morrow this hour shalt thou begin to write.
27: Then went I forth, as he commanded, and gathered all the people together, and said,
28: Hear these words, O Israel.
29: Our fathers at the beginning were strangers in Egypt, from whence they were delivered:
30: And received the law of life, which they kept not, which ye also have transgressed after them.
31: Then was the land, even the land of Sion, parted among you by lot: but your fathers, and ye yourselves, have done unrighteousness, and have not kept the ways which the Highest commanded you.
32: And forasmuch as he is a righteous judge, he took from you in time the thing that he had given you.
33: And now are ye here, and your brethren among you.
34: Therefore if so be that ye will subdue your own understanding, and reform your hearts, ye shall be kept alive and after death ye shall obtain mercy.
35: For after death shall the judgment come, when we shall live again: and then shall the names of the righteous be manifest, and the works of the ungodly shall be declared.
36: Let no man therefore come unto me now, nor seek after me these forty days.
37: So I took the five men, as he commanded me, and we went into the field, and remained there.
38: And the next day, behold, a voice called me, saying, Esdras, open thy mouth, and drink that I give thee to drink.
39: Then opened I my mouth, and, behold, he reached me a full cup, which was full as it were with water, but the colour of it was like fire.
40: And I took it, and drank: and when I had drunk of it, my heart uttered understanding, and wisdom grew in my breast, for my spirit strengthened my memory:
41: And my mouth was opened, and shut no more.
42: The Highest gave understanding unto the five men, and they wrote the wonderful visions of the night that were told, which they knew not: and they sat forty days, and they wrote in the day, and at night they ate bread.
43: As for me. I spake in the day, and I held not my tongue by night.
44: In forty days they wrote two hundred and four books.
45: And it came to pass, when the forty days were filled, that the Highest spake, saying, The first that thou hast written publish openly, that the worthy and unworthy may read it:
46: But keep the seventy last, that thou mayest deliver them only to such as be wise among the people:
47: For in them is the spring of understanding, the fountain of wisdom, and the stream of knowledge.
48: And I did so.
Now obviously I don't expect my Orthodox Jewish or fundamentalist Christian readers to just take Ezra 4's word for it. But it is an indication of an ancient tradition that Ezra (re-)wrote of the Torah.
None of this evidence is conclusive. It's impossible to say for sure whether Ezra was indeed the redactor, or whether there even was a single redactor. The Documentary Hypothesis argues that there were at least four distinct authors of the Five Books (J, E, P, and D) and that there was a fifth person who was the redactor.
To summarize, we know (1)that parts of the Torah seem to have been written long after Moses' death (2) that Ezra at least re-introduced the people to the Torah, including teaching them about Sukkot for apparently the first time; (3) that Ezra is known as "the scribe" and is compared favorably to Moses (!) by the Talmud; (4) that even in the mainstream Jewish tradition there is acceptance that Ezra at least made minor edits to the Torah; and (5) that there is an entire book from 2,000 years ago (albeit a few hundred years after Ezra's time) that claims Ezra wrote the current version of the Torah. It's enough for me to conclude that it is probable that Ezra was the redactor.
Who Wrote the Bible? by Richard Friedman
4 Ezra or 2 Edras
Straight Dope Staff Report: Who wrote the Bible? (Part 2)
Torah Redactor, wikipedia.
The Multiple Authorship of the Books Attributed to Moses, William Harwood, Ph. D.