In a well-known exposition, Sforno comments that, in addition to Betzalel, all the men who occupied themselves with the construction of the Mishkan were men of stature, sincerity and piety. This is in contrast to the workmen who built the First and Second Batei Mikdash; those work forces included people from various strata of society. Basically, they did not possess the appropriate spiritual and moral characteristics that would have imbued the project with eternal values. Furthermore, the First Bais Hamikdash built under the leadership of Shlomo Hamelech, was not the same as the Mishkan, built by Moshe Rabbeinu. They were both extraordinary leaders, but as great as Shlomo Hamelech was – he was not Moshe Rabbeinu.
We derive from here that one who physically creates an entity, i.e., edifice used for spiritual purposes, has a critical role in its endurance. It depends upon who is creating it, and the process he uses. It is well-known that the Gaon, zl, m’Vilna, was wont to say that when a shul that was built solely by G-d-fearing men whose intention was kulo l’Shem Shomayim, totally for the sake of Heaven, he would not have any machshavos zaros, foreign (inappropriate) thoughts enter his mind during the tefillah service. [I may add that the Gaon’s definition of foreign thoughts and our definition are quite different. His standard is much more stringent.]
Horav Dov Povarsky, Shlita, cites Horav Eliyahu Eliezer Dessler, zl (Michtav meiEliyahu), who quotes Chazal (Zohar Parashas Pinchas) that, had Moshe taken Klal Yisrael into Eretz Yisrael, the galus would never have occurred. Furthermore, had David Hamelech built the Bais Hamikdash, it never would have been destroyed. The reason that David did not build the Bais Hamikdash was that he had blood on his hands, resulting from the wars that that he had fought for the nation. Yalkut Shimoni (Shmuel II 145) relates that David asked Hashem, “Did I spill blood lawlessly?” (He had acted in accordance with halachah. Why should it be held against him?) “No,” replied the Almighty. “The blood that you spilled stands before Me as a korban.” (In other words, it was acceptable and holy, so why could he not build the Bais Hamikdash?).
Rav Dessler explains that had David built the Bais Hamikdash, indeed, it would not have been destroyed, but, as a result, if a time would have come that the nation would sin to the extent that it was not worthy of having the Bais Hamikdash, it would be necessary for them to be punished. Someone has to take the “fall,” and it could not be the Bais Hamikdash. Thus, it was for our sake, to our advantage, that David did not build it. As a result, when we sinned, we lost the Bais Hamikdash, but we are still here to talk about it. The reasoning behind this is: Had David not spilled the blood – had he acted with extraordinary compassion, then Hashem would have acted likewise with Klal Yisrael allowing them to live, instead of destroying the Bais Hamikdash to atone for their sins. David acted in accordance with Din, Strict Justice. If so, Hashem would be “compelled” to carry out Strict Justice against Klal Yisrael. Since (as a result of the blood on his hands) David did not build the Bais Hamikdash, it could take the place of the nation and atone for their sins. Consequently, Bnei Yisrael were spared.
The lesson which we must derive from here is that we have no idea what is behind Hashem’s decisions. That which on the surface does not make sense in our superficial perspective, is quite clear and sensible from the Heavenly perspective. Indeed, the mystery and transcendence of Hashem’s ways are essential cornerstones of our faith. While the ways of Hashem are not immediately apparent to us, we can view them as a source of moral guidance – once we delve deeper into the various rationales which are not readily accessible (as the above explanation). Since we can never begin to grasp Hashem’s thoughts, we can only encourage a lifelong commitment to learning and spiritual growth, in order to come closer to Him.