“And Hashem said to Moshe, ‘Come up to Me to the mountain and I shall give you the tablets of stone, and the Torah, and the mitzvah which I have written to instruct you.’”
It is written in Gemara Berachos (5a), Rabbi Levi, the son of Chama, said in the name of Resh Lakish: What is the meaning of the pasuk, “And Hashem said to Moshe, ‘Come up to Me to the mountain and I shall give you the tablets of stone, and the Torah, and the mitzvah which I have written to instruct you?’”
“The tablets of stone,” are referring to the 10 commandments. “And the Torah … ” is referring to the rest of Nevi’im and Kesuvim. “And the mitzvah … ” is referring to the mishnayos. “Which I have written … ” is referring to the Nevi’im (Prophets) and Kesuvim (Writings). “To instruct you … ” is referring to the Gemara.
In other words, from this Gemara, it seems that at the time that Moshe climbed Har Sinai to receive the 10 commandments, he also received, separately, the whole rest of the Torah—the rest of Chumash, all of the Nevi’im and Kesuvim, the mishnayos and even the Gemara.
The Zera Shimshon asks: Is there another Gemara that seems to contradict this Gemara? In Nedarim (22b), it is written, Rabbi Ada, the son of Rabbi Chanina, said: “Had the Jewish people not sinned with the Golden Calf, Hashem would have given to Moshe only the Chumash and the book of Yehoshua, because the division of Eretz Yisroel among all of the tribes is written there.” From this Gemara, it seems that Hashem gave the Nevi’im, Kesuvim, Mishnayos and Gemara only after Bnei Yisroel sinned, and not at the time that Moshe climbed Har Sinai to receive the 10 commandments! When was the rest of the Torah given—on Har Sinai or only after Bnei Yisroel sinned with the Golden Calf?
Zera Shimshon answers that the incident of the Golden Calf was not the only sin Bnei Yisroel committed at the time of the giving of the Torah. It is written in the midrash that the fact that after they heard the first two commandments from Hashem, they then asked Moshe to relate to them the rest—instead of hearing them directly from Hashem—was also considered as a sin. If they would have heard all of the 10 commandments from Hashem Himself and not through Moshe, they would not have been subject to forgetfulness, the yetzer hara or subjugated by foreign nations. Zera Shimshon understood from this that they also would have understood all of the Torah, the words of the Nevi’im, the Kesuvim, the mishnayos and all the wisdom of the Gemara from the 10 commandments! However, since they asked that Moshe tell them the 10 commandments, their hearts became hard like stone, and Hashem had to now explain each part of the Torah by itself to them.
However, that their request to hear the rest of the 10 commandments from Moshe was considered something wrong is not simple at all. In Parshas Va’eschanan (Devarim 5:25), when Moshe recounts the whole incident of the giving of the Torah, and Moshe mentions that Bnei Yisroel asked Moshe to continue telling them the mitzvos instead of Hashem, Hashem replied, “haiteevu kahl asher d’bairu—and they did well in all that they spoke.” If they lost so much by this request, how could Hashem say: “and they did well in all that they spoke?” From this pasuk, it seems that their request to hear from Moshe was not only not an aveira, but it was even commendable! On the other hand, from the midrash in our parsha, it seems it was an aveira. How can we reconcile these two sources?
Zera Shimshon explains that their request to hear from Moshe was inherently not commendable and not an aveira, but was dependent on their intentions. One possible way to understand their request is that they were scared if they would hear the whole Torah directly from Hashem—then even though that they would have no yetzer hara and, therefore, no inclination to do sin—there would still be the possibility to choose sin (see Michtav M’Eliyahu, volume 2, page 138). They were afraid if this would be the case, they would sin and they would not be able to argue that they were—at least partially—forced by the yetzer hara. If this would be so, they would be held completely responsible for what they did, and be deserving of the death penalty even for the smallest sin. If this was their intention, then their request was commendable and showed yiras Hashem. On the other hand, their request might have been simply because they wanted to sin, and it would be easier for them if they would hear the mitzvos from Moshe, instead of from Hashem.
To test their true intentions, after they requested if Moshe could relate to them the rest of the mitzvos, Hashem gave them back their yetzer hara—that had left them after hearing the first two commandments—to see what would be. If they would sin by mistake, then retroactively their request was made with good faith, and when Moshe would come down with the 10 commandments, they would be freed from their yetzer hara and they would be able to understand the whole Torah. However, if they would sin deliberately, then their original request would be judged as something bad, and they would stay with their hardened heart—unable to understand the whole Torah from the 10 commandments. Then—among the other things that would happen—Hashem would have to teach us Neviim, Kesuvim, mishnayos and Gemara separately.
According to the above, we can now explain that there is no contradiction between the Gemara in Berachos and the Gemara in Nedarim.
The pasuk, “Come up to Me to the mountain and I shall give you the tablets of stone, and the Torah, and the mitzvah which I have written to instruct you,” is written after Bnei Yisroel requested Moshe to continue—instead of Hashem—and at that time, the yetzer hara and the inability to understand the whole Torah from the 10 commandments returned to them. Therefore, there is an allusion that Hashem gave—in addition to the 10 commandments—Neviim, Kesuvim, mishna and Gemara. However, this was not unchangeable. It was only taken away from them to see what their intentions were by their request.
The Gemara in Nedarim that says if Bnei Yisroel wouldn’t have sinned with the Golden Calf, then, there would be no need to teach all the parts of the Torah separately is also true—since, retroactively, it would be shown that they had the right intentions and their hearts that became stone would be loosened. It is only because they did sin at the Golden Calf was the verdict made permanent, and Hashem gave us each part of the Torah piece by piece!