Former Shaliach in Melbourne
The Talmud Yerushalmi at the end of Masechet Megillah states:
“Tefillah (tefillin) and mezuzah – which comes first? Shmuel said, ‘Mezuzah comes first.’ Rav Huna said, ‘Tefillah comes first.’ What is Shmuel’s reasoning? Because [mezuzah] applies on the festivals and Shabbat. What is Rav Huna’s reasoning? Because [tefillin] applies to those sailing at sea and traversing deserts. There is a braitah that supports Shmuel: ‘Tefillin which have become worn out can be made into a mezuzah; a mezuzah that has become worn out cannot be made into tefillin. Why? Because we ascend in kodesh (holiness) and do not descend.’”
Simply put, Rav Huna and Shmuel’s machloket concerns precedence. Which comes first: a mitzvah which is chovat haguf (literally, obligation of the body) – i.e., a mitzvah from which there is no way to become exempt – or a mitzvah that is tadirah (frequent) – i.e., a mitzvah which is observed throughout the year.
The Rosh (Hilchot Tefillin 30) rules in favor of Rav Huna (that a mitzvah which is chovat haguf takes precedence), arguing that this opinion seems reasonable and that the Gemara itself explains Rav Huna’s reasoning. The Rama (Yoreh Deah 285:1) concurs:
“And in any event, if he does not have the resources to purchase tefillin and mezuzah, he should purchase tefillin and not mezuzah (according to the Yerushalmi at the end of Megillah), since a mitzvah which is chovat haguf takes precedence.”
Yet, the Beit Yosef (Orach Chayim 37) finds the Rosh’s ruling initially difficult to comprehend. First of all, the Gemara also explains Shmuel’s reasoning (“because [mezuzah] applies on the festivals and Shabbat”). Moreover, the Yerushalmi cites a braitah which supports Shmuel’s position, and whenever the Gemara refers to a braitah in order to support a specific amora, the halachah always follows that amora! In other words, by ruling in favor of Rav Huna, the Rosh is, in effect, contradicting the Yerushalmi!
However, the Beit Yosef also defends the Rosh, by noting that the Talmud Bavli (BT Menachot 23a) cites a different version of the braitah:
“A sefer Torah and tefillin that have become worn out – are not made into a mezuzah, because we do not descend from a stricter kedushah (holiness) to a lesser kedushah.”
The Rosh clearly relies on this version of the braitah and therefore rules according to Rav Huna.
Rav Akiva Eiger (Teshuva 9) has another question. According to the Yerushalmi, kedushah takes precedence over both chovat haguf and tadirut. At the same time, according to the Bavli, tefillin are on a higher level of kedushah than mezuzah. Therefore, tefillin take precedence over mezuzah.
Yet, the Bavli (BT Zevachim 91) also asks which korban should be offered first: one that is kadosh or one that is tadir? The matter is not resolved, although the Rambam (Hilchot Temidin 9) rules, based on the Gemara, that it is a matter of personal preference. But if we rely on the Bavli over the Yerushalmi for one aspect of the issue (i.e., what is kadosh), how can we then rule in favor of the Yerushalmi over the Bavli with respect to another part of the question?! (The Yerushalmi rules that kadosh takes precedence over both chovat haguf and tadir, but the Bavli says that we do not know which takes precedence: kadosh or tadir.)
Thus, it is still not clear why the Rosh – and later the Rama – rules that tefillin take precedence over mezuzah.
Rav Akiva Eiger clarifies the matter. Since, according to Rav Huna, chovat haguf takes precedence over tadir, tefillin therefore take precedence over mezuzah. But according to Shmuel, it is a matter of personal preference: Tadir takes precedence over chovat haguf, but tefillin have more kedushah than mezuzah (according to the Bavli). However, when it comes to kadosh and tadir, it is a matter of personal preference.
In other words, according to Shmuel, one may choose tefillin over mezuzah, but according to Rav Huna, one must choose tefillin over mezuzah. Therefore, the Rosh rules that tefillin take precedence over mezuzah, in order to accommodate both Shmuel and Rav Huna.
For Rav Akiva Eiger’s own personal explanation, please see Teshuvot Rav Akiva Eiger (9).