The Navi Zechariah (יב יב), prophesies that there will be a time when "the land shall mourn, each family by itself; the family of the house of David by itself, and their wives by themselves; the family of the house of Nathan by itself, and their wives by themselves." This verse indicates that a great mourning ceremony will be held at the end of days. The Gemara (סוכה נב ע"א) inquires about the nature of this mourning ceremony and presents an opinion that it will be held on the occasion of the slaughter of the yetzer hora, the evil inclination.
However, the Gemara raises a question: why mourn the destruction of the yetzer hora? Wouldn't it be more fitting to celebrate its death? The Gemara answers this question by quoting Rabbi Yehuda's teaching. R' Yehuda says that in the future, at the end of days, Hashem will bring the evil inclination and slaughter it in the presence of the righteous and the wicked alike. The righteous will see the evil inclination as a towering mountain, and the wicked will see it as a mere strand of hair. Both the righteous and the wicked will weep, but for different reasons. The righteous will weep and marvel at how they were able to overcome such a formidable obstacle, while the wicked will weep and regret how they failed to overcome such a seemingly insignificant challenge.
The Maharsha asks that while we can now understand the reason for the wicked to cry, this answer still doesn't settle the question of why the tzaddikim will weep when the yetzer hora is abolished. After all, the yetzer hora is a great obstacle that stands in the way of them getting closer to Hashem. Why then should the tzaddikim mourn its passing? The Maharsha provides an eye-opening answer that challenges the prevailing view on the existence of the yetzer hora.
Behold, It is Very Good
He bases his answer on the teaching of Chazal (בְּרֵאשִׁית רַבָּה ט ה), which states that the phrase וְהִנֵּה טוֹב מְאֹד - "and behold it was very good" said about the creation, is a reference to the creation of the yetzer hora. The Maharsha explains that, contrary to what we think, the yetzer hora is considered a "very good" thing. It provides us with an opportunity to challenge it, fight it and overcome it, and thus merit untold reward in the world to come. Without the yetzer hora, we would not have this opportunity to grow and develop spiritually and earn eternal reward.
For this reason, the tzaddikim will mourn when the yetzer hora will be slaughtered. They recognize that the yetzer hora provides them with a great opportunity for spiritual growth and that its removal means the loss of this opportunity. The tzaddikim understand that the yetzer hora was a necessary part of their spiritual journey.
(חִדּוּשֵׁי אַגָּדוֹת סֻכָּה נב ע"א ד"ה הִיא)