מִחוּץ לַֽמַּֽחֲנֶה מֽוֹשָׁבֽוֹ – his dwelling shall be outside the camp.
The occurrence of a festival during the mourning periods of shiva or shloshim annuls the mourning: the mourner must now rejoice on the festival. The nullification of mourning grows out of the person’s presence before God, as the essence of festival joy is the bonding between the human being and God’s Shechinah, the Divine Presence. The festival joy of a metzora, however, is indeed annulled. The expulsion of the metzora from all three concentric camps of priests, Levites, and Israelites (see Toras Kohanim on Lev. 13:46) and the fulfillment of the injunction that he shall dwell isolated; his dwelling shall be outside the camp (Lev. 13:46), create a barrier between the metzora and God’s Shechinah and annul his standing before God on the festival.
Attaining the kiyum of festival joy requires that individuals not only rejoice on their own but cause one another to be joyful as well. Thus, we find, one is obligated to gladden his household as explained in Abaye’s statement, A woman is made happy by her husband (Rosh Hashanah 6b) along with the Levite, the poor, and the unfortunate, as Scripture states, and you shall rejoice in your Festival—you, and your son, and your daughter, and your manservant, and your maidservant, and the Levite, and the stranger, and the orphan, and the widow, who are within your cities (Deut. 16:14). Similarly, Maimonides writes: While one eats and drinks [in celebration of a festival], it is his duty to feed the stranger, the orphan, the widow, and other poor and unfortunate people. For he who locks the gates of his courtyard and eats and drinks with his wife and children, without giving anything to eat and drink to the poor and the bitter in spirit—his meal is not a rejoicing in a divine commandment but a rejoicing of his stomach (Hilchos Yom Tov 6:18).
We thus find that a precondition to the kiyum of festival rejoicing is bringing about the rejoicing of others. That is why a metzora, who is sent out of the three camps and separated from the community of Israel, is unable to fulfill the commandment to rejoice—for by its very nature, rejoicing is a communal commandment. (Out of the Whirlwind, pp. 79-81)