Learning Torah is of paramount religious importance (see Payah 1:1), but there are numerous possible motivations for doing so. Learning purely because it is what G-d wants us to do is ideal, but understanding (or thinking we understand) why G-d wants us to do so can provide motivation as well, wanting those benefits independent of it fulfilling G-d’s will. There can be other, less (directly) spiritual benefits too, which can also provide motivation for Torah study, such as peer pressure, social standing and job requirements (if working in related fields). And, as we shall see, some of these may work together, whether by design or not. The relationship between the motivation for learning Torah and the benefit one gets from doing so is discussed by Rabbi Yishmael, the son of Rabbi Yochanan ben B’roka (Avos 4:5).
“One who learns in order to teach is (or isn’t, depending on the version of the text you have) given the wherewithal to learn and to teach, and (whereas) one who learns in order to do, is given the wherewithal to learn and to teach, to keep and to do.” Most versions have the person who learns in order to teach being provided with the ability to teach, with a straightforward reading being that even though his motivation wasn’t to learn for its own sake, but to be able to teach it to others, he is still given the ability to successfully do so. Alternatively (but not mutually exclusive with the first approach), based on contrasting it with “learning in order to do,” even though his motivation was not to use the knowledge gained to be able to perform the mitzvos, he is given the ability to teach it to others. Since someone who does not intend to keep the Torah he is learning is considered “wicked,” and would therefore not be allowed to successfully teach Torah to others, there are various ways the commentators deal with this statement.
Bartenura presents two possibilities. Either the statement really says that such a person is not given the wherewithal to teach Torah to others (a possibility he rejects because the manuscripts he trusts more say that he will be able to teach others), or it is discussing something totally different — contrasting someone who intends to only learn (and teach) with someone who wants to learn (and teach) as well as helping others in need (aside from their need to learn and know Torah). The wording does not fit so smoothly with the latter approach, though, as in the first part teaching seems to be the motivation for learning, without any mention or indication of it being to the exclusion of performing acts of kindness, while in the second part the “doing” (which Bartenura understands to mean “doing acts of kindness”) is the motivation for learning, whereas according to his explanation there is a desire to (learn and) teach that co-exists with a desire to perform acts of kindness.
Rashi has the version (as does the alternate text Avos d’Rav Nasan, 32) where a person who only learns in order to teach is not given the wherewithal to do so, but his reason is not because he didn’t intend to do the mitzvos he learned about, but because the reason he wanted to teach is in order to gain the respect of the community. (This is how Bartenura understands this version as well.) Others (e.g. Rabbeinu Bachye, S’fornu) do not think that having a selfish motivation to learn is reason enough to not be provided the wherewithal to learn and teach. After all, we are supposed to do the right thing even if it’s not for the best reason, as it can lead to doing it for the right reason. It is a bit awkward that the commentators have such divergent opinions, with some saying that wanting to be a teacher/community leader for the position it provides is so terrible that G-d wouldn’t help him succeed while others say that although it’s not ideal, since it can lead to better things G-d will help him.
[Rashi doesn’t explain why not intending “to do” what he learned isn’t reason enough (or more of a reason) to not allow him to be a successful teacher, but other commentators, who have the version that he is given the ability to teach others, explain why not learning “in order to do” isn’t problematic, and their approach can be applied to Rashi (and Bartenura) as well.
Rabbeinu Yonah says the contrast cannot be with someone who has no intention of keeping the Torah (as such a person would not be given the wherewithal to learn or to teach), but between someone who learns in order to be able to know every detail and gain a fuller understanding of what should be done, and someone who, as far as his doing the mitzvos is concerned, is content with his current level of knowledge (and is only learning in order to be able to teach). Such a person will be helped to accomplish his goal of teaching others, even if ideally he would want to learn in order to gain a fuller understanding of how to perform the mitzvos properly.
Tiferes Yisroel differentiates between materials that have a practical implication, whereby learning and knowing them will enhance mitzvah observance, and subjects that have no practical implication, such as hashkafic issues or a non-Kohain learning how Kohanim do the service in the Temple. Since studying these subjects will not impact how he does the mitzvos that do apply to him, there is no issue with his not learning them “in order to do.”]
Getting back to reasons people learn, aside from peer pressure (in communities where learning regularly is expected) and to improve social standing (as the learned are usually well respected), there is the desire to connect to G-d (since the Torah reflects His “mindset,” as it were), the need to know what to do and how to do it, the desire to understand things, and the desire to help others understand things. Sometimes, several of these can be intertwined, such as the desire to be knowledgeable and/or help others understand things with the allure of being treated with honor. Often, a choice is made to become a teacher in order to be able to spend the time needed to pay the bills involved in Torah learning. However, even if the underlying reason to learn Torah is admirable, each session of Torah learning may not be done for the best reasons. For example, let’s say a person went into the teaching profession because he wants to understand things as well as possible, and he knows that having to teach it to others requires a higher level of clarity. Nevertheless, when he sits down to prepare a lesson, is he doing so in order to understand the material better, or because he has to teach it the next day? The push to know it better right now comes from the deadline of having to give the lesson tomorrow, but the deadline is only there because he chose to put himself in a situation that has such deadlines. When he “learns in order to teach” because he committed himself to teaching, is it the same as “learning in order to teach” because he will then be treated with more respect?
Let’s look at it from the opposite perspective. If someone became a rabbi in order to be the center of attention in religious circles, part of his duties are (likely) teaching Torah classes. If he immerses himself in the topic because he becomes genuinely interested in it, is his learning still “in order to teach” since that’s why he started to learn it, or is it “for the sake of learning” since he is now totally into it?
“One who learns in order to teach is given the wherewithal to be successful at his learning and his teaching,” if he decided to teach for the right reasons, even if when he actually sits down to learn that wasn’t his direct motivation. Similarly, “one who learns in order to teach is given the wherewithal to be successful at his learning and his teaching,” if he becomes involved in the learning process to the extent that he wants understand it better, even if the reason he began the process was less than ideal. On the other hand, if he became a teacher for the wrong reasons, and his preparation for the lesson is done for the wrong reasons, “he is not given the wherewithal to successfully learn and teach.” Both lessons are true; which was meant by Rabbi Yishmael the son of Rabbi Yochanan ben B’roka depends on which version of the text he actually taught.