[(Numbers 7:1): And it came to pass on the day that Moses finished <setting up the Tabernacle>.] This is what Scripture says (Numbers 24:5): "How goodly are your tents, O Jacob, your dwellings, O Israel." If <Scripture intends> "your tents," why "your dwellings"? And if "your dwellings," why "your tents"? Rather, "How goodly are your tents"—these are the tents of your dwellings (mishkenotekha). Do not read it thus, but rather "your pledges" (mashkonotekha). The Holy One, blessed be He, said to Moses: Tell Israel that they should make for Me a Tabernacle (mishkan), so that if they sin, it may be taken as a pledge (mitmashken) on their account. Know for yourself that this is so: when they sinned, what is written (Psalms 78:59)? "God heard and was enraged." What is written after it (Psalms 78:60)? "And He forsook the Tabernacle of Shiloh, the tent He had set among men." This is the Tabernacle, which was made only so that it might be taken as a pledge on account of Israel.
The Tabernacle as Israel's Pledge in Midrash Tanchuma
Midrash Tanchuma Buber, Nasso 21:1
[ויהי ביום כלות משה]. זש"ה מה טובו אהליך יעקב משכנותיך ישראל (במדבר כד ה), אם אהליך למה משכנותיך, ואם משכנותיך למה אהליך, אלא מה טובו אהליך אלו אהלי משכנותיך, אל תהי קורא כן אלא משכנותיך, א"ל הקב"ה למשה אמור לישראל שיעשו לי משכן, שאם יחטאו שיהא מתמשכן על ידיהם, תדע לך שהוא כן, כשחטאו מה כתיב, שמע אלהים ויתעבר (תהלים עח נט), מה כתיב אחריו ויטש משכן (שילה) [שלו] אהל שיכן באדם (שם שם ס), זה המשכן שלא נעשה אלא שיהא מתמשכן על ישראל.