Settling the Wilderness Through Torah
במדרש המסעות שקיבלו בנ"י עתידין להיות ישוב ע"ש
In the Midrash on the journeys (Masei): the places that Bnei Yisrael received are destined to become settled habitation, as the verse states.
The Midrash teaches that the stations through which Bnei Yisrael traveled in the wilderness are ultimately meant to become inhabited, civilized places.
כמ"ש ימצאהו בארץ מדבר, וכ' לא תהו בראה לשבת יצרה
As it is written, "He found him in a desert land" (Devarim 32:10), and it is written, "He did not create it to be empty; He formed it to be inhabited" (Yeshayah 45:18).
The Sfas Emes brings two pesukim: Hashem found Bnei Yisrael in a barren desert, yet the world was created not to remain empty but to be settled and inhabited.
וישוב העולם תלוי בנפשות
And the settling of the world depends upon the neshamos.
Whether the physical world becomes settled or remains desolate is determined by the spiritual state of the neshamos within it.
ולפי שיש נפשות של תהו בעולם לכן יש מקומות של תהו ולכן נקראת מדבר העמים
And since there are neshamos of tohu (chaos and emptiness) in the world, therefore there are places of tohu, and that is why it is called "the wilderness of the nations" (Yechezkel 20:35).
When neshamos of tohu, rooted in emptiness and chaos, are present in the world, they give rise to desolate regions, which is why Scripture speaks of a "wilderness of the nations."
כי ע"י העמים שיש בנפשות יש בעולם מדברות ולעתיד אז אהפוך אל עמים שפה ברורה יהי' הכל מיושב
For it is on account of the foreign nations that exist within the neshamos that there are deserts in the world, and in the future, when "then I will transform the peoples to a clear tongue" (Tzefaniah 3:9), everything will become settled.
The foreign, unrefined element bound up within neshamos is what produces deserts; in time to come, when all the nations are elevated to serve Hashem with one clear voice, the entire world will be brought to settled order.
ובנ"י נכנסו באותן המקומות להביאם לידי ישוב
And Bnei Yisrael entered into those very places in order to bring them to a state of settlement.
Bnei Yisrael deliberately journeyed into these desolate places precisely in order to elevate and civilize them.
וכן איתא כשהצדיק בעיר הוא הודה זיוה הדרה ולכן זכו בנ"י בכח התורה לעבור בזה המדבר אשר לא ישב אדם שם ופי' [*חז"ל] אפילו אדה"ר לא [*הי'] יכול לעשותן ישוב וע"י בנ"י בכח התורה מתקנים התהו לעשותו ישוב:
And so it is brought down: when the tzaddik is in the city, he is its glory, its radiance, and its splendor (Bereishis Rabbah 79:6); therefore Bnei Yisrael merited, through the power of the Torah, to pass through this wilderness "where no man had dwelt" (Yirmiyah 2:6), and Chazal explained that even Adam HaRishon could not turn them into settled habitation, yet through Bnei Yisrael, by the power of the Torah, they repair the tohu to make it settled.
Just as a tzaddik brings glory to a city merely by dwelling there, Bnei Yisrael, through the strength of the Torah, were able to traverse a wilderness that not even Adam HaRishon could have settled, and by that same power of Torah they transform tohu into settled habitation.
Summary: The Sfas Emes explains that the journeys of Bnei Yisrael through the wilderness were meant to bring those desolate places to a state of settlement, for the world was created by Hashem to be inhabited and not to remain empty. The settling of the world hinges upon the neshamos: where neshamos of tohu are found, deserts arise, which is why Scripture calls it "the wilderness of the nations." In the future, when the nations are refined and elevated to serve Hashem with one clear voice, the entire world will become settled. Just as a tzaddik brings radiance to the place he dwells, Bnei Yisrael, through the power of the Torah, were able to pass through a wilderness that even Adam HaRishon could not have civilized, and through that power they repair the tohu and transform it into settled habitation.