"And the LORD said to Moses: Behold, I will rain down bread for you from the heavens" (Exodus 16:4). This is what Scripture says: "For by them He judges the peoples; He gives food in abundance" (Job 36:31). These heavens — by them He judges the nations of the world. Know this for yourself: when the generation of the Flood sinned, He judged them by them, as it is said, "He will rain down snares upon the wicked" (Psalms 11:6). Thus, "For by them He judges the peoples." The men of Sodom, when they sinned, He judged them by the heavens, as it is said, "And the LORD rained down upon Sodom" (Genesis 19:24). Sisera too, when he sinned, He judged him by the heavens, as it is said, "From the heavens they fought" (Judges 5:20). By the heavens He judges the peoples. "He gives food in abundance" — from them He gave sustenance to Israel. To what is the matter comparable? To a baker who was standing at the oven. His enemy entered, and he raked out coals and placed them upon his head. His beloved one entered; he drew out hot bread and gave it to him — the coals and the bread, both of them came forth from the oven. So too the Holy One, blessed be He, brought fire down upon the Sodomites and burned them, and from the heavens He brought down manna for Israel, as it is said, "Behold, I will rain down bread for you" (Exodus 16:4).
The Same Heavens That Burned Sodom Rained Manna on Israel
Midrash Tanchuma Buber, Beshalach 20:1
ויאמר ה' אל משה הנני ממטיר לכם לחם מן השמים (שמות טז ד). זש"ה כי בם ידין עמים [יתן אוכל למכביר] (איוב לו לא), השמים הללו בם הוא דן את אומות העולם, תדע לך כשחטאו דור המבול דנם בהם. שנאמר ימטר על רשעים פחים וגו' (תהלים יא ו), הוי כי בם ידין עמים וגו'. אנשי סדום כשחטאו דנם בשמים, שנאמר וה' המטיר על סדום וגו' (בראשית יט כד), אף סיסרא כשחטא בשמים דנו, שנאמר (משמים) [מן השמים] נלחמו וגו' (שופטים ה כ), בשמים הוא דן את העמים. יתן אוכל למכביר, מהן נתן מזון לישראל, למה הדבר דומה לנחתום שהיה עומד על הכבשן, נכנס שונאו וחתה נחלים ונתן על ראשו. נכנס אוהבו רדה פת חמה, ונתן לו הגחלים והפת, שניהם יצאו מתוך הכבשן, כך הקב"ה הוריד אש על הסדומים ושרפן, ומן השמים הוריד לישראל מן, שנאמר הנני ממטיר לכם לחם וגו'.