Smashing the evil inclination
ולכל היד החזקה ולכל המורא הגדול אשר עשה משה לעיני כל-ישראל: בראשית ברא אלקים את השמים ואת הארץ
And for all the mighty hand and all the great wonders that Moshe did before the eyes of Israel. In the beginning of G-d’s creating Heaven and Earth
Our Sages tell us that the final verse of the Torah is an allusion to Moshe breaking the tablets. When he came down from Mount Sinai with the two stone tablets, those that were literally engraved by G-d Himself with the Ten Commandments, he saw the Jews worshipping a Golden Calf. In a rage, he broke the tablets by smashing them to the ground. Our Sages tell us further that Hashem was pleased with this reaction, and told him “Yesher Koach!”
Now, in the hypothetical world where Moshe never smashed the tablets, the truth is that learning Torah would have been a very easy process. However, now that the original tablets are no more, to properly learn Torah takes great work and toil. Even with all of one’s efforts, there’s no guarantee for success. Only through Hashem’s mercy are we able to grasp anything from Torah, as if we found something valuable by chance.
We are taught that the Torah is the elixir to the evil inclination. If someone finds their urges are overpowering them, they are enjoined to run to the study hall. Now, it would make sense that the Torah could only crush the evil inclination through toiling in it. This is what is stressed in the morning prayers on the Torah, which emphasizes specifically toiling in Torah.
With these facts in mind, perhaps we can surmise that this was Moshe’s intent in breaking the tablets. He knew that once the Jews served the Golden Calf, a spirit of impurity fell upon them, making them more susceptible to sin and the evil inclination. The only way for them to succeed would be to toil in Torah. By breaking the tablets, he made toil the only way to be successful in Torah study. It is for this reason that Hashem was pleased that Moshe broke the tablets. It was the correct course of action based on what had occurred.
A popular form of biblical exposition is to try to figure out the “juxtaposition” of the last verse of the Torah with the first verse. In fact, we can find allusions to the above approach in the last and first verses of the Torah. The last verse stresses that Moshe did acts which were לעיני כל ישראל, before the eyes of Israel. The word לעיני is related to the word עיון, to delve and investigate. The idea being that through the breaking of the tablets, alluded to in the words “before the eyes of the Israel”, the Jews would have to delve into and investigate the Torah. From that point on, it was the only way to properly inculcate and understand its teachings. Regarding the first verse of the Torah, בראשית, our Sages tell us it’s a contraction of the phrase בשביל התורה שנקרא ראשית. Meaning, the world was created for the sake of the Torah. Why would that be? The only explanation is to ward off the evil inclination.
Chazak Chazak Venischazek! With that, we finished the Torah, and get to start anew.
 Based on Maharam Shik to Deuteronomy 34:12 s.v. עוד אמרתי. This is a recording of what the Maharam Shik said to his congregants on Simchas Torah, three months before he passed away
 Deuteronomy loc. cit., Genesis 1:1
 Sifrei Devarim § 357, brought by Rashi ad. loc.
 Exodus Chapter 32
 Shabbos 87a; Yevamos 62a
 The Maharam Shik says this without citation. Presumably he’s referring to Eruvin 54a, which says this explicitly
 יגעתי ומצאתי (Megillah 6b)
 Kiddushin 30b
 Bach to Tur Orach Chaim § 51
 This is a reference to an idea, which I believe was made popular by Nefesh HaChaim 1:6. In short, we are taught that the primordial snake implanted in Chava a type of spiritual contamination. At Mount Sinai, this contamination was taken away from the Jewish people (Shabbos 146a; Yevamos 103b; Avodah Zarah 22b). However, the Nefesh HaChaim clarifies, that once the Jewish people sinned with the Golden Calf, that contamination returned. He was preceded by the Alshich to Vayikra 21:1.
This is idea is sourced in many places in the Zohar, including Zohar I parshas Bereishis p. 52b, parshas Ki Sisa p. 193b, and Zohar Chadash Rus p. 83b. It’s also alluded to in Zohar I parshas Chayei Sarah p. 126b, as understood by the Chida in his Nitzotzei Oros ad. loc. § 1 and the Sulam ad. loc. The Chida references another source in Zohar Chadash which discusses why the women would have this contamination, considering they didn’t worship the calf, but I was unable to locate it. See U’Bacharta BaChaim ad. loc. § 22.
As well, see Ohr Yechezkel Torah V’Daas, Chavivin Yisrael § 2, who discusses that the effects of Sinai are still evident, and the contamination didn’t fully return. This is clear from Avodah Zarah loc. cit. Be’er Yosef to Leviticus 25:1,2 also sees proof of this from Shabbos loc. cit., Nedarim 20a, and Yerushalmi Kiddushin 4:1
 Bereishis Rabbah 1:4; Midrash Tanchuma Bereishis § 1