We are continuing in siman 10, discussing the concept of mitzvah habaah b’aveirah. It is important to note that the rishonim and acharonim deal with a Yerushalmi. The Yerushalmi discusses a person who tore kriyah on Shabbos because he heard that one of his seven closest relatives was niftar. The gemara says that he is yotzei the mitzvah of kriyah (rending one’s garment for the loss of a close relative). The Yerushalmi asks how it could be valid as it is a mitzvah habaah b’aveirah. The Yerushalmi furthers the question by pointing out that we know one is not yotzei the mitzvah of matzah on Pesach if they ate stolen matzah, so one should not be yotzei kriyah either. The Yerushalmi gives an answer, and there is much discussion to understand the answer.
The Beis Yosef understands based on the Ramban, who understands that there is a difference between an aveirah in a cheftza (object) and on a gavra (person). When the aveirah in question is in a cheftza, the aveirah is intrinsic to the item, so one is unable to fulfill the mitzvah. When the aveirah is in the gavra, the action may have been inappropriate, but the action does not negate the mitzvah, and the mitzvah is still valid. Thus, if one were to perform kriyah with a stolen garment, they would not fulfill the mitzvah of kriyah, because the aveirah intrinsically disqualifies the mitzvah, but when performing kriyah on shabbos, one is yotzei.
There are other ways to understand the Yerushalmi. The Korban Haeidah, one of the commentaries on the Yerushalmi, understands that mitzvah habaah b’aveirah applies when the aveirah in some way helps the mitzvah. When the aveirah has no relation to the mitzvah, the mitzvah will still be fulfilled. For example, when one steals matzah for the purpose of eating it on Pesach, they have a mitzvah to return the stolen item, v’heishiv es hagezeilah. When they eat the matzah, they transgress a new aveirah of destroying their mitzvah of v’heishiv es hagezeilah. It comes out a new aveirah was committed at the moment of fulfilling the mitzvah, and it was the second aveirah which allowed for the person to fulfill the mitzvah. Since the (second) aveirah is facilitating the fulfillment of the mitzvah, one is not yotzei. On the other hand, when one performs kriyah on Shabbos, Shabbos does not in any way change the mitzvah, so it is not considered a mitzvah habaah b’aveiah.
The Chayei Adam takes the position of the Korban Haeidah. The Gemara says that when a person davens in front of tzoah, their tefillah is not valid. The Gemara explains that the person is considered a rasha for not checking for tzoah beforehand, and zevach reshaim to’eivah (Mishlei 15:8) the korban of a rasha is an abomination. The purpose of a korban is to come close to Hashem; a rasha seeks the opposite. Why does the Gemara need to bring this pasuk to explain the issur of davening in front of tzoah; why is it not sufficient for the Gemara to state that davening in the presence of tzoah is a mitzvah habaah b’aveirah? The Chayei Adam explains that since the aveirah of tzoah does not affect or facilitate the performance of the mitzvah (davening, etc.), it would not fall under the regular rubric of mitzvah habaah b’aveirah. Therefore, the Gemara brings a different source for the issue of davening in the presence of tzoah.
Based on this idea, when it comes to birchas hamazon, where the purpose of birchas hamazon is not ritzui (closeness) like tefillah, the pasuk of zevach reshaim to’eivah does not apply, and it is not a mitzvah habaah b’aveirah, because the tzoah is not facilitating the mitzvah. Thus, although there is an aveirah being performed by reciting birchas hamazon in the presence of tzoah, one transgresses an aveirah and performs a mitzvah, and the two can coexist, just as they do when one performs kriyah on Shabbos.
The Chayei Adam accepts the understanding of the Korban Haeidah, and therefore holds that one is yotzei birchas hamazon. The Mishnah Berurah does not accept the opinion of the Chayei Adam, and employs the concept of mitzvah habaah b’aveirah in regards to birchas hamazon as well, because he understands the Yerushalmi differently than the Korban Haeidah.
We pasken like the Mishnah Berurah, that if a person knew the tzoah was present, they must repeat birchas hamazon. If they were not aware–even if they were negligent in checking–the Mishnah Berurah remains with a safeik. One should repeat birchas hamazon, but would not repeat other brachos.