אך ההפרש בין תורה לתפלה שלא בכוונה מובן מאליו

However, the difference between Torah and prayer without intention is self-evident.

כי לימוד התורה, הוא מבין ויודע מה שלומד, דבלאו הכי לא מיקרי לימוד כלל

For in the study of Torah without proper intent one understands and knows what he is learning, for otherwise it is not called study at all.

רק שלומד סתם, בלא כוונה לשמה מאהבת ה׳ שבלבו בבחינת גילוי

It is only that he is studying neutrally, without the intention of lishmah (“for its own sake”) out of a manifest love of G-d in his heart,

רק מאהבה המסותרת הטבעית

but only out of the latent natural love for G-d that every Jew harbors in his heart.

אך אינו לומד שלא לשמה ממש, להתגדל כו׳

On the other hand, he is not studying with an actual negative motivation, such as for self-aggrandizement or the like,

דהא לא סליק לעילא מן שמשא, כמו שכתוב בפרשת ויחי, דף רכ״ג עמוד ב׳

“for this [manner of Torah study] does not ascend higher than the sun,” as stated in [the Zohar,] Parshat Vayechi, p. 223b.

The Zohar states there that the verse,1 “What profit is there for man from all the toil that he toils under the sun,” does not refer to one’s toil in Torah study, for Torah is “loftier than the sun”; however, if this toil is undertaken “for self-aggrandizement,” it is also considered to be “under the sun,” for it does not ascend aloft.

היינו משום שמחשבתו וכוונתו הן מתלבשות באותיות הדבור, ואינן מניחות אותן לסלקא לעילא

That is because one’s thought and intent are clothed within the letters [of Torah] that he utters, and prevent them from ascending.

The ulterior motive that derives from the kelipot thus encumbers his words of Torah.

והכי נמי בתפלה שלא בכוונה, שמחשב מחשבות זרות

So, too, in prayer without intent,2 meaning that one entertains alien thoughts.

אלא מפני שכוונתו לשם שמים)

(3But since his intention is addressed to G‑d,

He is, after all, in a state of prayer, except that alien thoughts interpose.

לכך יש לה תיקון בקל, לחזור ולעלות

it is therefore easily corrected, so that [his prayer] may once again rise to the state from which it was originally repelled,

כשמתפלל בכוונה אפילו תפלה אחת מלוקטת מתפלות כל השנה

when he prays with proper intention even one [full] prayer gathered piecemeal from the prayers of the entire year.

When on one day one passage of the prayers was read with proper intent and on another day another passage, and so on, and then all these passages are gathered together, thus constituting one complete prayer from the prayers of a whole year, then all one’s prayers throughout the year are elevated.4

כמו שכתוב במקדש מלך, פרשת פקודי

Thus it is written in Mikdash Melech on Parshat Pekudei.)

We thus see that in one sense Torah without proper intent is superior to prayer without proper intent, for such Torah study creates angels in the World of Yetzirah, while prayer without proper intent is repulsed. On the other hand, when the lack of proper intent in Torah study is such that it prevents it from ascending, as in the case of studying for the sake of self-aggrandizement, then this is lower than prayer without proper intent.

For one proper prayer, or even a compilation of different prayers that add up to one prayer with proper intent, elevates all the other prayers of that year. With regard to Torah study, by contrast, even if one later studies with proper intent, this does not elevate his previous study; actual repentance is required. Until such time one’s Torah study is in exile within the kelipah which spawned his ulterior motive.

Nevertheless, since all Jews will eventually repent, for5 “No one of them will be rejected,” our Sages advise that6 “one should always study Torah and perform mitzvot even when they are not done for their own sake” — and, indeed, even if they involve an ulterior motive — for eventually he will achieve the state of lishmah, when he repents. This is explained by the Alter Rebbe at the end of ch. 39 of Tanya.