Gemara: Due to the sin of murder, the Beit Hamikdash is destroyed and the Divine Presence leaves Israel, as the Torah says: "Do not corrupt the Land that you are in, for blood will corrupt the Land, and atonement will not come for the Land for the blood that was spilled blood in it except with the blood of he who spilled it. And you shall not defile the Land that you live in, which I dwell in, for I am Hashem Who dwells in the midst of Bnei Yisrael" (Bamidbar 35:33-34). We can deduce that if you defile the Land [with spilled blood], you will not live there and I will not have My presence dwell there."
Ein Ayah: Murder creates double damage. First, it is responsible for the most horrible destruction to the community of people in regard to their ability to survive physically. However, worse than that is the moral destruction it causes. It engenders such destruction of the human spirit, which was created in Hashem’s image, Who is good and does good, Who gives life to the living in His goodness. When one takes another’s life, he is going in the opposite direction, by taking away life from one who could have performed the service of life in the world.
The Beit Hamikdash is designed not just to impact on the Jewish people alone. Shlomo said explicitly: "Also for the foreigner who is not from Your nation, Israel …" The idea is that the light of Hashem and His goodness should spread throughout the world. When can Hashem’s light and goodness spread among many nations, in a manner that improves the situation of human society? It is only when Israel’s moral level is at its highest.
When Israel allows itself to reach the lowest level, at which murders take place, how far can the Beit Hamikdash bring the world? What will the nations learn when they see that the light still did not penetrate into its natural place (within Israel) to illuminate the dark recesses of society and remove the greatest affliction, of people harming each other to the point of taking life? Under these circumstances, the Beit Hamikdash is destroyed.
Bnei Yisrael’s internal status is such that it contains power greater than the actual consequences it brings about by its actions. It is not enough for life to exist if it does not maximize its impact. What is the purpose of life if it is lowly and lacks lofty goals? It is not enough for society to just not self-destruct. Israel has a hidden sanctity dedicated to raising the value of life, which is facilitated by the dwelling of the Divine Presence among them. The national soul of the Community of Israel strives for the best and loftiest and to function in the world according to divine values. When they are successful and people see their splendor, pleasantness and dignity, no one will be able to ask what the point of life is. The House of Israel will be complete internally and will send forth rays of light to the world and its nations (see Yeshaya 42:6).
This lofty internal state is possible only when society as a whole is humane and stable. However, when the Beit Hamikdash is destroyed because the external, societal situation makes its intended function impossible, how can the soul of the nation as a whole reach its special spiritual height? Therefore, the Divine Presence leaves Israel. Bnei Yisrael’s living in Eretz Yisrael depends greatly on their national actions. It is true that much can be learned from individuals (see ibid. 61:9). However, the lessons are much more profound when they come from the community, when it acts in a complete manner with a secure kingdom in its Land. Therefore, when the Beit Hamikdash is missing, because the ability to impact others fails, it also causes the nation to be sent away from its Land. This is what happens when the Land is defiled and the people and the Divine Presence leave.