The mitzvah of building the Sanctuary is presented as a command that enables Israel to fix a place for divine service and draw their hearts toward holiness. The Chinukh emphasizes the educational effect of a sacred center.
וּמֵעַתָּה בִּהְיוֹת הַנָּחַת דַּעְתֵּנוּ עַל זֶה בְּעִנְיַן מִצְוֹתָיו בָּרוּךְ הוּא, תְּחַיֵּב אוֹתָנוּ לֵאמֹר כִּי בִּנְיַן בַּיִת לַשֵּׁם יִתְבָּרַךְ לַעֲשׂוֹתֵנוּ בָּהּ תְּפִלּוֹת וְקָרְבָּנוֹת אֵלָיו, הַכֹּל לְהָכִין הַלְּבָבוֹת לַעֲבוֹדָתוֹ יִתְעַלֶּה, לֹא מֵהֱיוֹתוֹ צָרִיךְ לָשֶׁבֶת בֵּית אֲנָשִׁים וְלָבוֹא בְּצֵל קוֹרָתָם, וְאִם אַרְזֵי לְבָנוֹן יִבְנוּהוּ אוֹ בְּרוֹתִים, כִּי הַשָּׁמַיִם וּשְׁמֵי הַשָּׁמַיִם לֹא יְכַלְכְּלֻהוּ וּבְרוּחוֹ יַעַמְדוּ, אַף כִּי הַבַּיִת אֲשֶׁר בָּנוּ בְּנֵי הָאָדָם צָרִיךְ לִכְבוֹדוֹ חָלִילָה, הֲלֹא יְדוּעִים הַדְּבָרִים וּבְרוּרִים שֶׁהַכֹּל לְהֶכְשֵׁר גּוּפוֹתֵינוּ, כִּי הַגּוּפוֹת יֻכְשְׁרוּ עַל יְדֵי הַפְּעֻלּוֹת וּבִרְבוֹת הַפְּעֻלּוֹת הַטּוֹבוֹת וְרֹב הַתְמָדָתָן מַחֲשָׁבוֹת הַלֵּב מִטַּהֲרוֹת מִתְלַבְּנוֹת מִזְדַּקְּקוֹת, וְהַשֵּׁם חָפֵץ בְּטוֹבָתָן שֶׁל בְּרִיּוֹת כְּמוֹ שֶׁאָמַרְנוּ. וְעַל כֵּן צִוָּנוּ לִקְבֹּעַ מָקוֹם שֶׁיִּהְיֶה טָהוֹר וְנָקִי בְּתַכְלִית הַנְּקִיּוּת לְטַהֵר שָׁם מַחְשְׁבוֹת בְּנֵי אִישׁ וּלְתַקֵּן לְבָבָם אֵלָיו בּוֹ, וְהוּא בָּרוּךְ הוּא בָּחַר אוֹתוֹ הַמָּקוֹם וֶהֱכִינוֹ אֶל הַטּוֹבָה לִבְנֵי אָדָם אוּלַי מֵהֱיוֹתוֹ אֶמְצָעוּת הָעוֹלָם בְּכִוּוּן, וְהָאֶמְצָעוּת נִבְחַר מִן הַקְּצָווֹת, אוֹ מִן הַטַּעַם שֶׁיִּהְיֶה בָּרוּךְ הוּא הַיּוֹדֵעַ. וּמִתּוֹךְ הֶכְשֵׁר הַמַּעֲשֶׂה וְטַהֲרַת הַמַּחֲשָׁבָה שֶׁיִּהְיֶה לָנוּ שָׁם יַעֲלֶה שִׂכְלֵנוּ אֶל הַדְּבֵקוּת עִם הַשֵּׂכֶל הָעֶלְיוֹנִי. וְעַל דֶּרֶךְ הַפְּשָׁט עַל הַצַּד הַזֶּה נְפָרֵשׁ שְׁרִיַּת הַשְּׁכִינָה בַּמָּקוֹם הַהוּא, וְאַף עַל פִּי שֶׁהָאֱמֶת כִּי אָמְרוּ רַבּוֹתֵינוּ זִכְרוֹנָם לִבְרָכָה (מגילה כח א) קְדֻשָּׁתָן עֲלֵיהֶם אֲפִלּוּ כְּשֶׁהֵן שׁוֹמֵמִין, שֶׁמַּשְׁמַע בְּזֶה שֶׁאֵין כָּל סִבַּת שְׁרִיַּת הַשְּׁכִינָה שָׁם מִצַּד הָעוֹבְדִים, אֶפְשָׁר לוֹמַר כִּי אוֹתוֹ הַמָּקוֹם בְּחָרוֹ הָאֵל לְבָרֵךְ בְּנֵי אָדָם אֲשֶׁר בָּרָא מִמֶּנּוּ כְּמוֹ שֶׁאָמַרְנוּ, וּכְמוֹ שֶׁהָיָה חֶפְצוֹ לִשְׁלֹחַ לִבְנֵי אָדָם נָבִיא לְהוֹרוֹתָם דֶּרֶךְ יֵלְכוּ בָּהּ וְיִזְכּוּ לְקַיֵּם נַפְשׁוֹתָם, כְּמוֹ כֵן חָפַץ בַּחֲסָדָיו הַגְּדוֹלִים לִקְבֹּעַ לָהֶם מָקוֹם בָּאָרֶץ שֶׁיִּהְיֶה נָכוֹן אֶל טוֹבַת הַבְּרִיּוֹת וּזְכוּתָם, וְכָל זֶה מֵחֲסָדָיו עַל בְּרִיּוֹתָיו. וּמִכָּל מָקוֹם, לְעוֹלָם תִּתְרַבֶּה שָׁם הַבְּרָכָה וְהַקְּדֻשָּׁה לְפִי הַפְּעֻלּוֹת הַטּוֹבוֹת שֶׁיַּעֲשׂוּ שָׁם בְּנֵי אָדָם, וְאָז עִם הַפְּעֻלּוֹת הַטּוֹבוֹת יִפָּתְחוּ מַעְיְנֹת הַטּוֹב כְּנֶגְדּוֹ, כִּי בֶּאֱמֶת אֵינָהּ דּוֹמָה קְדֻשַּׁת הַמָּקוֹם בְּחֻרְבָּנוֹ לִקְדֻשָּׁתוֹ בְּיִשּׁוּבוֹ.
And from here, in that this is the grounding of our opinion about the matter of His commandments, blessed be He, we are obligated to say that the building of the House for God, may He be blessed, for us to do our prayers and sacrifices to Him in it — it is all to prepare our hearts to His service, may He be elevated. [It is] not from His need to sit in the house of people and to come under the shade of their beams — whether they build it from cedars of Lebanon or from cypresses, “as the heavens and the heavens of the heavens cannot contain Him,” and they [only] stand by His spirit; “surely the house that people built” would [not] be needed for His glory, God forbid. Are the things not known and clear that it is all for the refinement of our bodies? As bodies are refined by actions; and by the multiplication of good actions and their great constancy, the thoughts of the heart become purified, cleansed [and] sanitized — and God desires the good of the creatures, as we have said. And therefore, He commanded us to fix a place that would be pure and completely clean to purify the thoughts of people there and to refine their [our] hearts towards Him in it. And maybe He, blessed be He, chose that place and prepared it for the good of people from its being exactly at the center of the world, and the center is choicer than the ends; or for [another] reason that He, blessed be He, would be [its] Knower. And through the refinement of action and the purification of thought that we will have there, our minds will rise to clinging with the Highest mind. And we will explain the dwelling of the Divine Presence in this place in this way according to the simple understanding: Even though, in truth, our Rabbis, may their memory be blessed, said (Megillah 28a) [that] their sanctity is upon them, even when they are desolate — which implies that there is no reason at all for the dwelling of the Divine Presence from the side of the worshipers — [still,] it is possible to say that God chose this place to bless from it people that He crated, as we have said. And [just] like it was His desire to send a prophet to people to teach them the path in which they should walk and [so] merit to preserve their souls, so too did He desire, in His great kindnesses, to fix a place on earth for them that would be prepared for the good of people and their merit — and all of this is from His kindnesses to His creatures. And regardless, blessing and holiness will increase there according to the good actions that people do there. And then with the good actions, the channels of good will open up corresponding to it; since in truth the holiness of a place in its destruction is not similar to its holiness in its inhabitation (use).