בְּכֹל אֲשֶׁר הִתְהַלַּכְתִּי בְּכָל בְּנֵי יִשְׂרָאֵל הֲדָבָר דִּבַּרְתִּי אֶת אַחַד שִׁבְטֵי יִשְׂרָאֵל אֲשֶׁר צִוִּיתִי לִרְעוֹת אֶת עַמִּי אֶת יִשְׂרָאֵל לֵאמֹר לָמָּה לֹא בְנִיתֶם לִי בֵּית אֲרָזִים
2 Samuel 7:7
The writer of the Book of Shmuel presents the prophets' perspective on the Temple (Mikdash/Sanctuary). First, the nation of ancient Israel wanted to have a king like the other nations around them. This was rejected by the Almighty, who gave the Prophet a list of the things a king would do, for example, sacrificing their children in his own interest wars. The nation would be sacrificing their children to molok or molekh (king), contrary to the divine instruction (Leviticus 18:21). Nevertheless, they choose a king. To place restrictions to the leadership of this king, new guidelines were added later in the Torah; perhaps, in the days of Ezra.
The second king of Israel, David, now wants to build a temple like the one other nations have built for their idols and gods. This idea is rejected by the Holy One of Israel, who states that a temple was never required neither ordered in the Torah. The Tabernacle (Mishkan) was a practical and portable sanctuary to protect sacred items and where rituals could be performed. GOD will dwell among the people (Exodus 29:45). The sanctuary (temple) at Shilo, apparently, was a modest place compared with the place built later by Shlomo. David wanted, probably to enhance his reputation or maybe from an honest devotion, to build a temple. An idea that got the attention and favour of Nathan, the court prophet. While the idea is rejected by the Eternal One. The prophet Nathan is ordered to return to the king with the disapproval message. Instead GOD promise to build a Temple. This by a future descendant of David. The kingdom will be forever. It is understood that this is the beginning of the Messianic Age hope. The promonarchy writers in ancient Israel misunderstood it to be about Shlomo, instead of an Anointed One (Mashiach) in a distant future. The tension with the anti-monarchy prophets and others developed further in Israel history. A matter to address somewhere else another time.
Shlomo builds the Temple in Jerusalem. It was not by order from the Heavens. However, to avoid it to become a sanctuary for idols, the LORD sanctifies it, hence Mikdash, as a place to worship the Only True GOD. To avoid an ethnocentric religion, the Temple is also called a House of Prayer for all nations. Tragically through history the Temple became itself the idol. It was during the division of the kingdom, Israel to the north and Judah to the south, that the debate concerning the proper place of worship develops. When Israel is conquered and deported by the Assyrians, and later Judah by the Babylonians, they learned that GOD is not bound to a temple made by human hands. Regardless of it, as a political symbol, more than religious, those who returned from the galut to Jerusalem rebuilt a Temple, which later was enhanced by the Romans. Again, as a tool of political strategy. This second temple was also destroyed by the Romans. Again, we learned that GOD is not bound to a building (cf. Isaiah 66:1). Shlomo realized it after building the Temple (1 King 8:27).
Today people from all faith traditions are learning that to worship we do not need temples, mosques, synagogues, or churches. GOD is not bound to any of these places, neither to any nation or religion. The synagogue developed in ancient times as a house of study. A place to gather and learn from the Torah as a community. The study of the Torah is an act of worship. Needless to say, at times even these small temples we call synagogues or house of prayer or house of study, have become almost an idol. To the point that people at times have been more concerned with the building than with the purpose of it. We have seen that in other religions' communities of faith. One more time through these tragic and sad circumstances we all are facing, we remember that GOD is not bound to buildings or rituals. GOD dwells among the people that faithfully seek to make themselves a Temple. Yes, our synagogues are important, as long as they meet its purpose, as we wait for the time of the Messianic Age. Until then, make your home a Temple for the glory of GOD.
הוּא יִבְנֶה בַּיִת לִשְׁמִי וְכֹנַנְתִּי אֶת כִּסֵּא מַמְלַכְתּוֹ עַד עוֹלָם
2 Samuel 7:13