The Torah in Parashat Shoftim (16:21) introduces a prohibition against planting a tree alongside the altar, which Chazal understood as including building a structure in the azara – the Temple courtyard (Tamid 28b). The Yalkut Shimoni, here in Parashat Shoftim (907), comments that this prohibition applies even to a sukka, which may not be constructed in the azara.
The Panim Yafot notes that earlier (end of Parashat Re’ei), the Yalkut Shimoni comments that sacrificial food must be eaten in a sukka during Sukkot just like ordinary food. At first glance, these two passages of the Yalkut Shimoni seem contradictory. How can sacrificial food require a sukka if the Torah forbids constructing sukkot in the Temple courtyard, where sacrificial food is eaten? The Panim Yafot writes that we are compelled to distinguish in this regard between the two basic categories of sacrificial food – kodashei kodashim and kodashim kalim. The sacrifices in the category of kodashim kalim may be eaten anywhere in Jerusalem, and do not have to be eaten specifically in the Temple courtyard, and, as such, they require a sukka during Sukkot. By contrast, kodashei kodashim, which may be eaten only in the azara, necessarily are eaten without a sukka, given the prohibition against building sukkot in the azara.
Rav Avishai Maitlis, in Ve-darashta Be-chagekha (p. 34), cites his father as explaining this distinction based on the famous rule of “teishvu ke-ein taduru” – the mitzva of sukka requires treating the sukka as one’s home. Since the kohanim are obligated to eat kodashei kodashim in the Temple courtyard, these are not foods that are normally eaten at home. As such, unlike other meals, the kohanim’s consumption of this sacrificial food does not require a sukka, and thus kodashei kodashim are eaten without a sukka.
The Minchat Kena’ot commentary to Masekhet Sota (41b) disagrees with the Panim Yafot, and maintains that the kohanim did, in fact, eat their sacrificial food in sukkot constructed in the azara. He notes that the prohibition against building in the azara applies only to building wooden structures, and thus it would be entirely permissible to build a sukka out of other materials, such as stone. And although the sekhakh requires vegetation, the Minchat Kena’ot cites sources that state that the prohibition is limited to building with wood derekh gedilatan – the way they are grown, meaning, with the branches upright. The sekhakh is formed by laying the wood horizontally across the top of the structure, and thus this would not transgress the prohibition against constructing a building in the azara. Accordingly, it is entirely possible to construct a sukka in the azara in a permissible manner, and so even kodashei kodashim could be eaten in a sukka during Sukkot.
(See also Rav Asher Anshel Schwartz’s Ma’adanei Asher, Parashat Shoftim, 5768)