Maimonides discusses the purpose of mitzvot and the necessity of intent (kavvanah), arguing that intention elevates the act from a mechanical task to a meaningful spiritual pursuit.
האימון להתמקד בה' 17 ודע שכל מעשי העבודות הללו, כמו קריאת התורה והתפילה ועשיית שאר המצוות – אין תכליתם אלא לאמן אותך בעיסוק בציווייו יתעלה על פני עיסוק בענייני העולם הזה, והרי אתה כאילו מתעסק בו יתעלה על פני זולתו. ואם אתה מתפלל בהנעת שפתיך כאשר אתה פונה אל הקיר וחושב על משאך ומתנך; וקורא בתורה בלשונך בעוד לבך עוסק בבניין ביתך בלי להתבונן במה שאתה קורא; וכיוצא בזה כל אימת שאתה עושה מצוה, אתה עושה אותה באבריך כמו החופר בור באדמה או חוטב עצים מן היער, מבלי להתבונן על משמעות אותו מעשה, לא מיהו מקורו ולא מה תכליתו – אל תחשוב שהשגת תכלית, אלא תהיה אז קרוב למי שנאמר עליהם: "קָרוֹב אַתָּה בְּפִיהֶם, וְרָחוֹק מִכִּלְיוֹתֵיהֶם" (ירמיהו יב,ב). שלב הכנה א) הדבר הראשון שתטיל על עצמך הוא לפַנות את דעתך מכל דבר כאשר אתה קורא קרית שמע ומתפלל, ואל תסתפק בכוונה בקרית שמע בפסוק ראשון ובתפילה בברכה ראשונה. שלב הכנה ב) כשדבר זה יעלה בידך לגמרי, ויתבסס במשך שנים, הטל על עצמך לאחר מכן שכל אימת שתקרא בתורה או תשמע אותה, שלא תחדל מלִפְנות כל־כולך ובכל מחשבתך להתבונן במה שתשמע או תקרא. שלב הכנה ג) כשגם דבר זה יתבסס למשך תקופה, הטל על עצמך שמחשבתך תהיה תמיד זַכּה (ממחשבות אחרות) בקריאתך את כל שאר דברי הנביאים. ואפילו בכל הברכות תתכוון בהן להתבונן במה שתבטא בשפתיך ולבחון את משמעותו. שלב יעד) לאחר שיזדככו לך אותן עבודות, ומחשבתך בהן בעת עשייתן תהיה נקייה ממחשבה בדבר מענייני העולם הזה – זמן לצרכי גוף) הטל על עצמך אחר כך להעסיק את מחשבתך בצרכיך או במותרותיך, וככלל תעסיק את מחשבתך במילי דעלמא (=בדברי העולם הזה), (רק) בזמן אכילתך או שתייתך או בהיותך במרחץ או כשאתה מדבר עם אשתך או בניך הקטנים או כשאתה מדבר עם המון העם. הרי מצאתי לך זמנים ארוכים וממושכים לחשוב בהן בכל מה שתצטרך מענייני הקניין וניהול הבית ותיקון הגוף. זמן למצוות) אך בזמני המעשים התורניים אל תעסיק את המחשבה אלא במה שאתה עושה, כמו שביארנו.
We must bear in mind that all such religious acts as reading the Law, praying, and the performance of other precepts, serve exclusively as the means of causing us to occupy and fill our mind with the precepts of God, and free it from worldly business; for we are thus, as it were, in communication with God, and undisturbed by any other thing. If we, however, pray with the motion of our lips, and our face toward the wall, but at the same time think of our business; if we read the Law with our tongue, whilst our heart is occupied with the building of our house, and we do not think of what we are reading; if we perform the commandments only with our limbs, we are like those who are engaged in digging in the ground, or hewing wood in the forest, without reflecting on the nature of those acts, or by whom they are commanded, or what is their object. We must not imagine that [in this way] we attain the highest perfection; on the contrary, we are then like those in reference to whom Scripture says, “Thou art near in their mouth, and far from their reins” (Jer. 12:2). The first thing you must do is this: Turn your thoughts away from everything while you read Shema‘ or during the Tefilláh, and do not content yourself with being devout when you read the first verse of Shema, or the first paragraph of the prayer. When you have successfully practised this for many years, try in reading the Law or listening to it, to have all your heart and all your thought occupied with understanding what you read or hear. After some time when you have mastered this, accustom yourself to have your mind free from all other thoughts when you read any portion of the other books of the prophets, or when you say any blessing; and to have your attention directed exclusively to the perception and the understanding of what you utter. When you have succeeded in properly performing these acts of divine service, and you have your thought, during their performance, entirely abstracted from worldly affairs, take then care that your thought be not disturbed by thinking of your wants or of superfluous things. In short, think of worldly matters when you eat, drink, bathe, talk with your wife and little children, or when you converse with other people. These times, which are frequent and long, I think must suffice to you for reflecting on everything that is necessary as regards business, household, and health. But when you are engaged in the performance of religious duties, have your mind exclusively directed to what you are doing.