Rava explains, in the Gemara's conclusion, that both Torah and Mitzvos
protect a person from Yisurin -- physical afflictions in this world -- both
during the time that he is involved in them (learning Torah or performing a
Mitzvah), and afterwards. The Torah has the added property that during the
time a person is learning, it also protects the person from the Yetzer ha'Ra
(i.e. it affords spiritual protection in addition to physical protection).
How can the Gemara's conclusion be reconciled with the statement of the
Beraisa? The Beraisa says that the difference between the merit of Torah and
the merit of a Mitzvah is that the merit of Torah provides a more permanent
protection. According to Rava, though, both the Torah and a Mitzvah offer
protection from Yisurin even when a person is not involved with them!
Regarding protection from the Yetzer ha'Ra, a Mitzvah does not provide *any*
protection, while the Torah does provide protection. With regard to what
does the Beraisa state that the Mitzvah does offer protection but its
protection is less than that of the Torah? (TOSFOS DH Mitzvah)
(a) The MAHARSHA answers that the Mitzvah's protection helps only in Olam
ha'Zeh. The Torah, in contrast, offers protection for the Neshamah even
after the person leaves this world. It protects the Neshamah from the
Yisurin of Din, judgement (like the Gemara says in Chagigah (27a), "The fire
of Gehinom has no power over those who learn Torah"). (See also RASHASH and
NETZIV.) In this sense the protection of the Torah is more permanent than
the protection of a Mitzvah.
TOSFOS, however, does not accept this answer, perhaps because the Beraisa
continues and says that there is another explanation for the difference
between Torah and Mitzvos, and that is that sin can extinguish the merit of
a Mitzvah (l'Asid la'Vo; see Rashi and Tosfos), but it cannot extinguish the
merit of Torah. How can the Beraisa say that a sin can extinguish a Mitzvah?
If a person does a Mitzvah how can he lose the reward for it by doing an
Aveirah? The Beraisa must mean that the reward of the Mitzvah cannot
overpower the necessity for punishment for the Aveirah. Therefore, the
person will be punished for the Aveirah despite the fact that he did a
Mitzvah. With regard to Torah, though, the Torah that he learned will
protect him, to some extent, from being punished for his Aveiros. Hence, the
"Davar Acher" of the Beraisa is expressing this difference between Torah and
Mitzvos, and therefore that cannot be the same difference that is expressed
in the first half of the Beraisa! Perhaps the Maharsha learns that the "Dava
r Acher" is expressing the same difference but only in different terms,
which Tosfos felt was improbable and thus did not accept it.
(b) The CHAFETZ CHAIM in LIKUTEI HALACHOS explains that there are two ways
of learning Torah and doing Mitzvos: they can be done either Lishmah or
she'Lo Lishmah. Rava -- who says that Torah protects a person from sinning
only when a person is involved with it -- is discussing Torah that one
learns she'Lo Lishmah, such as the Torah-learning of Doeg (Sanhedrin 106a).
However, if a person learns Torah or does Mitzvos *Lishmah*, then the Torah
protects him from the Yetzer ha'Ra even while he is not involved in learning
Torah, and Mitzvos protect him from the Yetzer ha'Ra when he is involved in
them.
The ORACH CHAIM HA'KADOSH (Vayikra 26:3:7) uses this approach to defend the
view of Rav Yosef who suggests that Torah protects a person from the Yetzer
ha'Ra even when he is not learning. The Gemara rejects Rav Yosef's view,
asking how could Doeg and Achitofel have sinned if they learned Torah and
the Torah protects a person from sinning? The Orach Chaim answers that Doeg
and Achitofel learned Torah she'Lo Lishmah, and that is why their Torah did
not protect them while they were not learning. When Rav Yosef explains,
according to the Beraisa, that Torah protects a person even when he is not
learning, he was discussing Torah that one learns Lishmah. (Tosfos might
have rejected this approach because of this reason itself; according to the
Chafetz Chaim, Rava is not justified in rejecting Rav Yosef's explanation of
the Beraisa. The Chafetz Chaim might have understood that a woman learning
Torah is comparable to learning Torah she'Lo Lishmah, since she has no
Chiyuv to learn. That is why Rava -- who is discussing the Torah and Mitzvos
of a woman -- relate them to Torah and Mitzvos she'Lo Lishmah.)
(c) TOSFOS later in the Sugya asks another question. Rav Yosef in the Gemara
says that if Achitofel would have realized that the merit of Torah protects
a person, then he would not have attempted to harm David ha'Melech. The
reason Achitofel thought that he could overpower David ha'Melech was because
David ha'Melech seemed to be involved with the sin of Eshes Ish, and the
Torah says that such an act causes the Shechinah to depart from the person
and not protect him. Achitofel did not realize that David's Torah could
protect him even from such an Aveirah. Tosfos (DH v'Hen) asks that the
Gemara earlier says that both Torah and Mitzvos can protect a person from
punishment, even while he is not involved in them. Why, then, does Rav Yosef
imply that it was the unique Zechus of *Torah* that was able to protect
David ha'Melech?
To answer these questions, we must first ask another question. We know that
if someone sees a Talmid Chacham doing an Aveirah at night, he must assume
that by the next morning the Talmid Chacham has done Teshuvah (Berachos
19a). Why, then, did Achitofel think that he could overpower David
ha'Melech, if David already did Teshuvah for his sin? The answer is that the
Mishnah at the end of Yoma (85b) tells us that Teshuvah alone does not
suffice to atone for all sins. If a person commits the type of sin that
involves Kares or Misas Beis Din, he must first undergo Yisurin in order to
gain atonement. If a person commits the type of sin that involves Chilul
Hashem (because the sin is publicized), he does not achieve full atonement
until death. Achitofel relied on the fact that David ha'Melech would have to
suffer Yisurin and death first in order to gain atonement, and therefore he
reasoned that he would be successful in joining Avshalom to overpower David
ha'Melech.
We may suggest that there are two different types of tragedies that can
befall a person. There are those that one faces because of natural
circumstances (his "Mazal"), and there are those that one faces as a direct
result of his sins ("Yisurin Mechaperin"). When the Beraisa says that Torah
and Mitzvos protect a person from evils even when he is not involved in
Torah and Mitzvos at the moment, it might be referring to natural evils that
befall him because of his Mazal. However, if a person is destined to suffer
punishment because of his sins, then the Mitzvos that he does cannot protect
him from punishment, since it is decreed that he must suffer to atone for
his sons. Learning Torah, however, can take the place of physical suffering
or even death, because the exertion involved in toiling in Torah is
equivalent to physical affliction and even death (see Tamid 32a, Berachos
63b, Shabbos 88a, and Midrash Tanchuma Parshas Noach).
This explains why only Torah was able to protect David ha'Melech. David was
deserving of Yisurin to atone for his sins, and only Torah could provide
that degree of Yisurin for his atonement.
This also answers Rava's statement. Rava says that the merit of a Mitzvah
protects a person permanently, even when he is not involved with the
Mitzvah, but it only protects him from natural circumstances. If the person
is deserving of punishment and needs Yisurin to atone for his sins, then
only Torah can provide him protection. The Beraisa, which compares the Torah
to daylight which affords more permanent protection, is referring to
protection from Yisurin due to Aveiros.
Why, however, does Rava explain that the merit of a Mitzvah could protect a
woman from the effects of the Mei Sotah? The Mei Sotah is punishing her for
her sin of adultery, and we just explained that a Mitzvah cannot protect a
person from Yisurin that come for atonement for a sin! The answer is that
the punishment that comes from drinking the Mei Sotah is not the same as a
normal punishment of Misas Beis Din that is administered in order to punish
a wrongdoer and atone for his sins. Rather, the Mei Sotah is administered to
prove whether or not she is permitted to her husband by the natural reaction
that Hashem put into the world that a sinner's body reacts to the holiness
of the Shem ha'Kodesh mixed with the Mei ha'Kiyor and the Afar ha'Mishkan.
The merit of a Mitzvah is able to protect the woman from this "natural"
calamity, even though it cannot protect her from the Yisurin that she must
suffer eventually due to her sins. (M. Kornfeld)