The 165th prohibition is that the kohanim are forbidden from leaving the Temple when they are in the middle of performing the Temple service.
The source of this prohibition is G‑d's statement,1 "Do not go out from the entrance of the Communion Tent (pesach ohel moed)." The prohibition is repeated in reference to the kohen gadol in the verse,2 "He may not leave the Temple."
In the words of the Sifra: "From the phrase 'from the entrance of the ohel moed' I would think that the prohibition applies regardless of whether or not the Temple service was being performed. The verse,3 'He may not leave the Temple in order that he not profane' [the Temple service] teaches that the prohibition applies only when the Temple service is being performed. [What is the significance of the conclusion of the verse] 'because G‑d's anointing oil is upon you'? One might think that the death penalty for one who leaves while in the middle of the Temple service is only for Aaron and his sons — who were anointed with this special oil. What is the source to apply this law for all kohanim and for all generations? This verse 'because G‑d's anointing oil is upon you.' "
This law contains an extra stringency for a kohen gadol in that he may not [leave the Temple even to] attend the burial [of a close relative]. This is the meaning of the verse, "He may not leave the Temple." This is explained in the second chapter of Sanhedrin,4 which clearly derives the law that he may not attend a relative's burial from this verse, "He may not leave the Temple."
From here we learn that he may perform the Temple service even on the day of the relative's death. To quote the statement of our Sages from tractate Sanhedrin:5 "The verse states, 'He may not leave the Temple in order that he not profane' [the Temple service] — however, there is someone else who would profane the Temple service if he would not leave [and instead continue the Temple service]." This refers to a regular kohen, who may not perform the Temple service when an onen. This law which prohibits an onen from performing the service is derived as mentioned above. This principle that a regular kohen is not allowed to perform the service when an onen, while a kohen gadol is allowed is explained in the end of tractate Horios.6
It7 has been made clear that the phrase v'lo y'chalel ("[he may not leave the Temple] in order that he not profane") is a statement that something will not happen [sh'lilah] rather than a prohibition, because his service is not profaned although he is an onen.8
On the simple level, the phrase v'lo y'chalel [has another interpretation: it] gives the reason for the prohibition which immediately precedes it — "He may not leave" in order that "he not profane." According to both interpretations9 this phrase is not counted as a separate commandment, as is clear to all who understand the principles which were given as the introduction to this work.10
We have explained that these three prohibitions — not to grow long hair, wear torn clothing, or leave the Temple — are repeated regarding the kohen gadol in order to convey a particular idea. This is similar to the verses which prohibit [a kohen from marrying] a divorcee, chalalah, or zonah, which are repeated [in reference to the kohen gadol] in order to convey a particular idea.
The three areas prohibited by these three laws are the same ones referred to in the verses, "Your heads al tifrau," "Your clothing lo tifromu," and "Do not go out from the entrance of the ohel moed." Moshe Rabbeinu, may he rest in peace, gave them over to Elazar and Isamar, saying, "in spite of your shock over this frightening event [i.e. the death of Nadav and Avihu], those things which are normally forbidden to you do not become permitted. Rather, you remain forbidden from doing all the things you were forbidden from doing beforehand, i.e., allowing the hair to grow long, wearing torn clothing, and leaving the Temple during the Temple service."
The repetition in reference to the kohen gadol teaches that the prohibition applies [only] at the time that the Temple service is being performed, and that only at such a time is the [Divine] death penalty in effect. This is similar to the way that the commandment, "Do not go out from the entrance of the ohel moed" is explained by the verse, "He may not leave the Temple."11
Although each repetition of these prohibitions in reference to the kohen gadol is used to derive an additional law, as explained above, nevertheless, they do not increase the total number of mitzvos — as is understood by anyone who understands our introduction.12 This is because each repeated verse is used to teach you that the act is prohibited specifically during the time of the Temple service. One should understand this well.