Chinuch

לעולם יעסוק אדם בתורה ומצוות אע״פ שלא לשמה שמתוך שלא לשמה בא לשמה״ (פסחים נ:)

“A person should always involve himself in Torah and mitzvos, even not l’shemah, for its own sake, because from doing it not l’shemah, he will come to do it l’shemah” (Pesachim 50b).

Chazal are teaching us that the way for a person to be mechanech oneself and grow is through avodah shelo l’shemah, and that by doing so, he will eventually come to serve Hashem l’shemah.
When we listen closely to the words of Chazal, we will discern that it isn’t the hergel, the force of habit, which enables a person to achieve the level of “l’shemah,” but rather the “laasok,” the total involvement in Torah and mitzvos. As Chazal put it, “L’olam yaasok, a person should always involve himself in Torah and mitzvos, even shelo l’shemah.” By doing Torah and mitzvos merely as a matter of habit, one will never achieve avodah l’shemah. In order to grow and be mechanech ourselves, we need to make Torah and mitzvos our ‘eisek,’ our occupation (Nefesh Hachayim 3).
When we are mechanech ourselves and accustom ourselves to being involved in avodah shelo l’shemah, we take sure steps towards the objective of doing Torah and mitzvos l’shemah.
The word “eisek” doesn’t refer to a one-time transaction; it’s an “occupation, a business.” That indicates constant involvement in negotiations and in search for change and advancement. Likewise, total involvement in Torah and mitzvos, even when done shelo l’shemah, imbues us with a sense of constant change and advancement in our avodas Hashem.