The ubiquitous practice of lighting Chanukah neiros in shul between mincha and ma’ariv finds its source in the Rishonim and is codified in Shulchan Aruch (Orach Chaim 671:7). The Mechaber, in the middle of a discussion regarding the correct placement of the Menorah in, or outside, of one’s house, states, “And in the Beis HaKnesses, one places it by the southern wall, and we light and bless on it for pirsumei nisa.” Elaborating on this minhag, the Rema adds that one does not fulfill his obligation to light Chanukah neiros through this hadlakah; one must return home and light again.
In the Beis Yosef (ibid.) the Mechaber brings two sources for this practice. He first suggests that lighting Chanukah neiros in shul was instituted for the sake of guests who do not have a house to light in, just as Chazal instituted Kiddush in shul on Friday night to accommodate the guests who eat, drink, and sleep there. The Beis Yosef states that the Kol Bo (Siman 44) offers such an approach. There are a few questions here: If the Beis Yosef means to refer to guests who do not sleep in the shul, they should light wherever they are spending the night, alongside their hosts, not in the shul. If the guests are sleeping in the shul, why do they not light the Menorah themselves? Furthermore, the Kol Bo himself does not actually say that the practice was instituted for the sake of guests. Instead, he writes that the neiros are lit to be motzi those who are not baki or zariz, which raises an obvious and serious issue: how can the obligation to light be fulfilled by those who are either not baki or zariz outside the auspices of a home, when the Halacha clearly mandates lighting in a bayis?
The Beis Yosef suggests a second approach, which can also be found in the aforementioned passage in the Kol Bo and in Teshuvas HaRivash (Siman 111): the lighting of Chanukah neiros in shul serves as a way of publicizing the miracle in a very public fashion, especially in light of the fact that nowadays we do not place our personal menoros outside. The Rivash adds, we make a beracha on this lighting just like we make a beracha on Hallel of Rosh Chodesh even though it is only a minhag, and one does not fulfill his obligation through this lighting. This Rivash is the source for the Mechaber’s ruling that we make a beracha on lighting in shul, for his statement that the lighting itself is for the sake of pirsumei nisa, and for the Rema’s ruling that one does not fulfill his obligation with it.
When the Rivash contends that one is allowed to make a beracha despite the fact that the hadlakah a minhag, just like we make a beracha over Hallel on Rosh Chodesh, he is taking a definitive position in what is really a dispute amongst the Rishonim. The Gemara in Sukkah (44b), while discussing chibut aravos, quotes the following story: Aivu says, I was before Rebi Elazar bar Tzadok, and a man came and brought him an aravah. He took it, shook it, and did not make a beracha on it, for he thought it was a minhag from the Nevi’im. The Gemara implies that we do not make berachos over minhagim. As such, one would assume that we likewise do not make a beracha over the Hallel of Rosh Chodesh, which the Gemara in Ta’anis (28b) says is a minhag, and indeed the Rambam rules accordingly (Hilchos Megillah v’Chanukah 3:7). Rabbeinu Tam, however, disagrees and maintains that a beracha is recited, and the Gemara in Sukkah poses no difficulty to this practice. The minhag of chibut aravos is different than the minhag of kriyas haHallel: chibut aravos involves nothing more than a simple act of waving the aravah; therefore one does not recite a beracha. Kriyas haHallel is more a significant act, which does warrant a beracha. Rabbeinu Tam brings proof that we make berachos on minhagim from Yom Tov Sheini, whose observance is referred to as a minhag and yet we recite the various berachos associated with kedushas hayom. (See Tosafos Berachos 14a, Sukkah 44b)
This discussion has great relevance to our sugya since, as a well-known Teshuva of the Chacham Tzvi (88) points out, the Mechaber seems to contradict himself. In Hilchos Rosh Chodesh the Mechaber rules like the Rambam— one does not say a beracha on the Hallel of Rosh Chodesh (422:2). How, then, could the Mechaber in Hilchos Chanukah allow for the recitation of a beracha of the minhag of lighting Chanukah neiros in shul when the Mechaber simultaneously rules like the Rambam who disallows berachos on minhagim?
The Magen Avraham (672:6) points to a second instance where the Mechaber contradicts himself within the scope of hilchos Chanukah. The Gemara in Shabbos (21a) quotes a Beraisa that teaches, the mitzvah of neiros Chanukah is from shkiyas hachamah until shetekaleh regel min hashuk. The Gemara explains this Beraisa to mean one of two things: either it is providing the actually timeframe within one must light their neiros, or it is providing a shiur for how much oil must be placed into the neiros (enough to last the same amount of time between shkiyas hachamah until shetekaleh regel min hashuk.). According to the first approach, one is not obligated in lighting after “there are no more feet in the market,” whereas according to the second one is obligated.
The Tur (672) rules that if one does not light within half an hour of the end of shkiyah, he is still obligated to light the rest of the night, and adds, “this is not like the Rambam who writes that if one forgets or purposefully does not light with shkiyas hachamah, he may light until shetekaleh regel min hashuk. Once that time has passed, he no longer lights.” Seemingly, the Tur rules like the first explanation in the Gemara while the Rambam rules like the second. The Beis Yosef quotes the Rosh who rules, like the Tur, that one may light all night, but stresses the fact that the obligation to do so is due to a safek, since the Gemara had two approaches to understanding the Beraisa, and only one obligated lighting after shetekaleh regel min hashuk. On the basis of this Rosh, the Beis Yosef objects to the Tur and writes that the Tur should not have written, “and not like the Rambam,” because even those Poskim who do obligate lighting only obligate lighting out of safek, whereas the language of the Tur suggests that the dispute is m’ikar hadin. It is important to notice that the Beis Yosef does not object outright to the ruling of the Tur, only to the language he used, indicating that the Tur also holds that the obligation to light is only on account of a safek. Indeed, were this not the Tur’s intent, we would be faced with a glaring issue: how could the Tur rule that there is a clear obligation to light after shetekaleh regel min hashuk when the Gemara itself has a safek. Rather, it is more likely that the Tur and Beis Yosef are on the same page in this regard.
The Magen Avraham points out that since the Beis Yosef concludes that the obligation to light is on account of safek, one would not make a beracha. This yields a problem, for in the Shulchan Aruch (672:2) the Beis Yosef writes that one may light all night long and does not mention whether or not a beracha is recited, implying that a beracha is indeed recited, no differently than if one were to light earlier in the evening. If the obligation to light is out of safek, how can one make a beracha? Alongside the Magen Avraham’s difficulty with the Beis Yosef, we can pose the same question to the Tur: If the Tur agrees with the Beis Yosef, why didn’t the Tur himself write than one does not make a beracha later at night?
Rav Yaakov Emden in his Mor u’Ketziah suggests a very straightforward yesod that answers all of these difficulties. Whereas by all other birchos hamitzvah the beracha is a separate obligation from the mitzvah itself, the beracha on hadlakas neiros Chanukah is fundamentally different in that the beracha itself helps facilitate the goal of the mitzvah. Since neiros Chanukah are essentially a method of pirsumei nisa, it is necessary to accompany the hadlakah with a beracha. If you don’t, how would anyone know that you are lighting for the sake of the mitzvah of pirsumei nisa? Perhaps you’re lighting a candelabra for own benefit. As such, any hadlakah of neiros Chanukah requires a beracha. The beracha indicates publicly that the lighting of these particular neiros are a remembrance of the neis of Chanukah.
With this in mind, we can very well understand how both the Beis Yosef and the Tur can, at the same time, indicate that one makes a beracha on neiros Chanukah even if he lights late at night, and yet maintain that the obligation to light is only out of safek. Despite the fact that normally we do not permit the recitation of berachos in situations of safek, the beracha on neiros Chanukah is an exception, because without the berachos there would be no clear expression of the fact that the hadlakah is for the sake of pirsumei nisa, which would impinge upon the pirsum of the neis itself. Similarly, despite the fact that the Mechaber rules that we do not make berachos on minhagim such as over Hallel on Rosh Chodesh, the Mechaber does obligate a beracha over the hadlakas neiros in shul because the beracha itself it necessary for the sake of pirsumei nisa.
Two diyukim, both in the words of the Mechaber, support R’ Yaakov Emden’s yesod. In the Beis Yosef, the Mechaber writes that the purpose of lighting in the shul is in order to “publicize the miracle before the people and to organize the berachos before them in order that there should be a great pirsum for G-d,” indicating that the berachos themselves facilitate the pirsumei nisa. Likewise, in Shulchan Aruch, the Mechaber writes, “we light and bless for the sake of pirsumei nisa.” One would expect the Mechaber to have written, “we light for the sake of pirsumei nisa and bless.” The actual words of the Mechaber indicate that both the lighting and the blessing are for the sake of pirsumei nisa, as Rav Yaakov Emden suggests.