The Sifrei teaches that observance of mitzvot outside the Land of Israel is considered like practicing for when one returns — the Land is the true home and context of the Torah's commandments.
ולא תחניפו הארץ - הרי אזהרה לחניפים. ד"א ולא תחניפו - אל תגרמו את הארץ שתהא מחנפת לכם: כי הדם הוא יחניף - ר' יאשיה היה אומר לשון נוטריקון: כי הדם יחון אף בארץ: ולארץ לא יכופר - למה נאמר? לפי שהוא אומר דברים כא וערפו שם את העגלה; הרי שנתערפה עגלה, ואחר כך נמצא ההורג, שומע אני יתכפר להם? תלמוד לומר לארץ לא יכופר: ולא תטמא הארץ אשר אתם יושבים בה - מגיד ששפיכות דמים מטמא הארץ ומסלקת את השכינה, ומפני שפיכות דמים חרב בית המקדש: אשר אני שוכן בתוכה - חביבים ישראל, שאף על פי שהם טמאים שכינה ביניהם; שנאמר כי אני שוכן בתוכה, ואומר ולא יטמאו עוד את מחניהם, ולא תטמא הארץ. רבי נתן אומר: חביבים ישראל שבכל מקום שגלו שכינה עמהם: גלו למצרים שכינה עמהם, שנאמר (שמואל א ב) הנגלה נגליתי אל בית אביך בהיותם במצרים לבית פרעה; גלו לבבל שכינה עמהם, שנאמר (ישעיה מג) למענכם שולחתי בבלה; גלו לעילם שכינה עמהם, שנאמר (ירמיה מט) ושמתי כסאי בעילם והאבדתי משם מלך ושרים; גלו לאדום שכינה עמהם, שנאמר (ישעיה סג) מי זה בא מאדום חמוץ בגדים מבצרה. וכשהם חוזרים שכינה עמהם, שנאמר (דברים ל) ושב ה' את שבותך ורחמך. והשיב לא נאמר, אלא ושב ה' אלהיך. ואומר (שיר השירים ד) אתי מלבנון כלה אתי מלבנון תבואי תשורי מראש אמנה מראש שניר וחרמון ממעונות אריות ומהררי נמרים. ר' אומר: משל למה הדבר דומה? למלך שאמר לעבדיו, אם תבקשוני הריני אצל בני. כל זמן שאתה מבקשני הריני אצל בני. וכן הוא אומר (ויקרא טז) השוכן אתם בתוך טומאותם. ואומר (ויקרא טו) בטמאם את משכני אשר בתוכם. ואומר ולא יטמאו את מחניהם אשר אני שוכן בתוכם, ואומר (במדבר לה) ולא תטמאו את הארץ אשר אתם יושבים בה אשר אני שוכן בתוכה, כי אני ה' שוכן בתוך בני ישראל: סליק להו ספר במדבר סיני ברוך הגבר אשר יבטח באדני:
(Bamidbar 35:33) "Velo tachanifu the land": This is an exhortation against flatterers ("chanafim"). Variantly: Do not cause the land to "flatter" you (i.e., not to produce fruit). "ki hadam hu yachanif eth ha'aretz": Rabbi Yoshiyah interpreted this acronymically, viz.: "ki hadam hu yachon af ba'aretz" ("for the blood will repose wrath upon the land." "and the land will not have atonement." What is the intent of this? Because it is written (Devarim 21:4) "and they shall break there the neck of the heifer in the river-bed," I might think that if its neck were broken and afterwards the murderer were found, it would effect atonement. It is, therefore, written "and the land will not have atonement." We are hereby taught that the spilling of blood defiles the land and removes the Shechinah. And because of the spilling of blood the Temple was destroyed. (Bamidbar 35:34) "in whose midst I dwell": Beloved are Israel, for even when they are tamei the Shechinah reposes among them — (Vayikra 16:16) "who dwells with them in the midst of their uncleanliness," and (Ibid. 15:31) "… when they defile My sanctuary which is in their midst," and (Bamidbar 5:3) "and they shall not make unclean their camps in whose midst I dwell." (Ibid. 35:34) "for I the L-rd dwell in the midst of the children of Israel." R. Nathan says: Beloved are Israel, for wherever they are exiled the Shechinah is with them. They were exiled to Egypt — the Shechinah was with them, viz. (I Samuel 2:27) "Did I not reveal Myself to the house of your father when they were in Egypt (enslaved to) the house of Pharaoh?" They were exiled to Bavel — the Shechinah was with them, viz. (Isaiah 43:14) "Because of you I was sent to Bavel." They were sent to Eilam — the Shechinah was with them, viz. (Jeremiah 49:38) "I placed My throne in Eilam, and banished from there king and officers." They were exiled to Edom — the Shechinah was with them, viz. (Isaiah 63:1) "Who is This, who comes from Edom, with sullied vestments, from Batzrah?" And when they return, the Shechinah will be with them, viz. (Devarim 30:3) "Then the L-rd your G-d will return with your captivity and He will have mercy upon you." It is not written "and He will return to you," but "and He will return with you!" And it is written (Song of Songs 4:8) "With Me from the Levanon, My bride — with Me from the Levanon shall you come. You will look from the top of Amanah, from the top of Senir and Chermon, from the dens of lions, from the mountains of leopards." Rebbi says: An analogy: A king says to his servant: Why do you search for me? I am with my son. Whenever you need me, I am with my son. "For I, the L-rd dwell in the midst of the children of Israel."