Another interpretation: "If you walk in My statutes," etc., "then I will give your rains in their season," etc.; "but if you will not hearken to Me," etc., "and I will make your heavens like iron," etc. (Leviticus 26:3, 4, 14, 19). And thus it says: "Therefore over you the heavens have withheld the dew, and the earth has withheld its produce" (Haggai 1:10) — for because of your iniquities they too are smitten. They would have stationed two battalions of soldiers so as to guard each and every one of Israel [that they should not sin. And not only do the nations not guard Israel, but they even keep them away from the commandments. And because Israel sins, the whole world entire is smitten, as it is said: "Therefore over you the heavens have withheld the dew" (Haggai 1:10). But if they do not sin, the whole world is blessed on their account, as it is said: "And through your seed shall all the nations of the earth bless themselves" (Genesis 26:4). The Holy One, blessed be He, said to Moses: "You yourselves have seen that I have spoken with you from the heavens. You shall not make beside Me gods of silver, nor gods of gold shall you make for yourselves" (Exodus 20:22-23) — for if you sin and pray before Me, I will not answer you, as it is said: "And it came to pass that, as He called and they did not hearken, so they shall call and I will not hearken, says the Lord of Hosts" (Zechariah 7:13). Therefore: "You shall not make beside Me gods of silver," etc.]
Why the Whole World Suffers When Israel Sins
Midrash Tanchuma Buber, Bechukotai 3:1
ד"א אם בחקותי תלכו וגו', ונתתי גשמיכם בעתם וגו', ואם לא תשמעו לי וגו', ונתתי את שמיכם כברזל וגו' (ויקרא כו ג ד יד יט), וכן הוא אומר על כן עליכם כלאו שמים מטל והארץ כלאה יבולה (חגי א י), כי בשביל עונותיכם אף הם לוקין, היו מעמידין שני איסטרטיוטין כדי שיהיו משמרין כל אחד ואחד מישראל [שלא יחטאו, ולא דיין שאין האומות משמרין את ישראל, אלא עוד מבטלין אותן מן המצות, ועל שישראל חוטאין כל העולם כולו לוקה, שנאמר על כן עליכם כלאו שמים מטל, ואם אינם חוטאין כל העולם מתברך בשבילם, שנאמר והתברכו בזרעך כל גויי הארץ (בראשית כו ד), אמר הקב"ה למשה אתם ראיתם כי מן השמים דברתי עמכם, לא תעשון אתי אלהי כסף ואלהי זהב לא תעשו לכם (שמות ה כב כג), שאם תחטאו ותתפללו לפני איני עונה אתכם, שנאמר ויהי כאשר (קראתי) [קרא] ולא שמעו כן יקראו ולא אשמע אמר ה' צבאות (זכריה ז יג), לכך לא תעשון אתי אלהי כסף וגו'].