Why can't forbidden pleasures be elevated to holiness? The Tanya's eighth chapter confronts this question head-on.
The answer lies in the three completely impure kelipot (קליפות)—the shells of absolute spiritual darkness. Unlike kelipat nogah, which is translucent and can swing toward holiness, these three shells are sealed shut. They correspond to the 365 prohibitions of the Torah. When a person eats non-kosher food, even accidentally, even with the intention of using the energy for a mitzvah, the vitality of that food cannot ascend. It is held captive within the impure shell.
Rabbi Schneur Zalman goes further. The distinction between permitted and forbidden desires reflects two fundamentally different types of evil inclination. The craving for forbidden things—non-kosher food, prohibited relationships, theft—is what the Tanya calls a "non-Jewish demon." It draws from the three sealed kelipot and has no capacity for elevation. The craving for permitted pleasures—eating a kosher meal for the taste alone, pursuing comfort—is a "Jewish demon." It is still a demon. But it is a demon that can be redeemed.
This distinction has practical consequences for the body. Since every piece of food becomes flesh and blood, the Tanya says the body itself absorbs the spiritual quality of what it consumes. Even permitted food consumed without sacred intention leaves a residue of kelipah (a shell of impurity) in the flesh. This is why, according to the Tanya, the body undergoes chibut hakever (חיבוט הקבר), the purification of the grave—a post-mortem process of cleansing the physical body from the accumulated residue of worldly pleasure.
The only person exempt from this purification? Rabbi Yehuda HaNasi, the editor of the Mishnah (the earliest code of rabbinic law), who reportedly declared on his deathbed that he had never derived personal pleasure from this world—not even from his little finger. For everyone else, the body keeps a record of every pleasure consumed, and the account must eventually be settled.
There is an additional aspect in the matter of forbidden foods. The reason they are called issur [“chained”] is that even in the case of one who has unwittingly eaten a forbidden food intending it to give him strength to serve G–d by the energy of it, and he has, moreover, actually carried out his intention, having both studied and prayed with the energy of that food, nevertheless the vitality contained therein does not ascend and become clothed in the words of the Torah or prayer, as is the case with permitted foods, by reason of its being held captive in the power of the sitra achara of the three unclean kelipot. This is so even when the prohibition is a Rabbinic enactment, for the words of the Scribes are even more stringent than the words of the Torah, and so forth.1 Mishnah, Sanhedrin 11:3; Bamidbar Rabbah 14:12, etc. Therefore, also the evil impulse (yetzer hara) and the force that strains after forbidden things is a demon of non-Jewish demons, which is the evil impulse of the nations whose souls are derived from the three unclean kelipot. On the other hand, the evil impulse and the craving force after permissible things to satisfy an appetite is a demon of the Jewish demons,2 Cf. Zohar III:253a; 277a f. for it can be reverted to holiness, as is explained above.3 Ch. 7. Nevertheless, before it has reverted to holiness it is sitra achara and kelipah, and even afterward a trace of it remains attached to the body, since from each item of food and drink are immediately formed blood and flesh of his flesh. That is why the body must undergo the Purgatory of the grave,4 Chibut hakever. Cf. Zohar II:151a, and especially R. Chaim Vital, end of Sefer Hagilgulim, and Sefer Hakavanot, p. 55b f. in order to cleanse it and purify it of its uncleanness which it had received from the enjoyment of mundane things and pleasures, which are derived from the uncleanness of the kelipat nogah and of the Jewish demons; only one who had derived no enjoyment from this world all his life, as was the case with our Saintly Master [Rabbi Judah the Prince], is spared this. As for innocent idle chatter, such as in the case of an ignoramus who cannot study, he must undergo a cleansing of his soul, to rid it of the uncleanness of this kelipah, through its being rolled in “the hollow of a sling,”5 Cf. I Samuel 25:29: “And the soul of your enemies, He will sling it with the hollow of the sling,” eschatologically interpreted in Shabbat 152b. as is stated in the Zohar, Parashat Beshalach, p. 59.6 Zohar II:59a. But with regard to forbidden speech, such as scoffing and slander and the like, which stem from the three completely unclean kelipot, the hollow of a sling [alone] does not suffice to cleanse and remove the uncleanness of the soul, but it must descend into Gehinom (Purgatory). So, too, he who is able to engage in the Torah but occupies himself instead with frivolous things, the hollow of a sling cannot itself effectively scour and cleanse his soul, but severe penalties are meted out for neglect of the Torah in particular, apart from the general retribution for the neglect of a positive commandment through indolence, namely, in the Purgatory of Snow,7 The Purgatory, where the soul is cleansed of the “stains” acquired during its lifetime so that it could then enter Gan Eden in the presence of the Divine Glory, operates on the principle of “measure for measure,” or in kind. Thus offences of commission caused by passion and lust are cleansed in a “stream of fire,” while those of omission, due to indolence and coolness, are cleansed in a Purgatory of Snow, etc. as is explained elsewhere.8 Arizal, Likkutei Torah, Shemot. Cf. also Zohar I:62b; 237b; II:150a-b. Likewise, he who occupies himself with the sciences of the nations of the world is included among those who waste their time in profane matters, insofar as the sin of neglecting the Torah is concerned, as is explained in the Laws Concerning Study of the Torah.9 The first work of Rabbi Schneur Zalman was a treatise on the Laws Concerning the Study of the Torah (Hilchot Talmud Torah), first published in Shklov, 1794, and subsequently incorporated in his Shulchan Aruch. Moreover, the uncleanness of the science of the nations is greater than that of profane speech, for the latter informs and defiles only the middot which emanate from the element of the holy ruach within his divine soul with contamination of the kelipat nogah that is contained in profane speech which is derived from the element of the evil ruach of this kelipah in his animal soul, as mentioned above;10 Ch. 1. yet he does not defile the [intellectual] (faculties of chabad in his soul, for they are but words of foolishness and ignorance, since even fools and ignoramuses can speak that way. Not so in the case of the nations’ sciences whereby he clothes and defiles the intellectual faculties of chabad in his divine soul with the contamination of the kelipat nogah contained in those sciences, whither they have fallen through the “shattering of the vessels” out of the so-called “hinder-part” of chochmah of kedushah, as is known to the students of Kabbalah. Unless he employs [these sciences] as a useful instrument, viz., as a means of a more affluent livelihood to be able to serve G–d or knows how to apply them in the service of G–d and His Torah. This is the reason why Maimonides and Nachmanides, of blessed memory, and their adherents engaged in them.