It is written: "But He is One, and who can turn Him back? And whatever His soul desires, He does" (Job 23:13). Rabbi Papyas expounded: Because He is unique in His world and there is none who can protest against His hand, whatever He wishes He does. Rabbi Akiva said to him: Enough, Papyas! One does not expound here in this way. Rather, He does everything by judgment. And what is the meaning of "One"? It is rather that just as the petitioner makes his petition below, so too above; and just as the Sanhedrin deliberate and judge below, so too above, as it is said: "I saw the LORD sitting upon His throne, and all the host of heaven standing by Him on His right hand and on His left" (1 Kings 22:19). But is there a left above? Has it not already been said, "Your right hand, O LORD, is glorious in power" (Exodus 15:6)? Rather, these incline toward the side of merit, and these incline toward the side of guilt; thus everything is in judgment. And just as the petitioner makes his petition below, so too above. From where do we learn this? That thus said Daniel: "The matter is by the decree of the watchers, and the sentence by the word of the holy ones" (Daniel 4:14). Yet you say: because He is unique in His world, He does whatever He wishes! What is the meaning of "But He is One"? Rabbi Pinchas the Priest son of Chama said: Because He is unique in His world, He knows the judgment of His creatures. [Rabbi Yehuda the Levite son of Rabbi Shalom said: Because He is unique in the world, He knows the mind of His creatures.] The one to whom He says, "Go on My errand," goes. Thus it says, "And whatever His soul desires, He does" (Job 23:13). And likewise Jeremiah said, "I am but a lad" (Jeremiah 1:6). The Holy One, blessed be He, said to him: "Do not say, I am but a lad" (Jeremiah 1:7). And so too with Sodom, He deliberated and judged in their case and saw that they were liable to destruction, and only afterward did He send them (the angels) to overturn it. Therefore it is said: "And the two angels came to Sodom" (Genesis 19:1).
Why Two Angels Came to Sodom Only After Judgment
Midrash Tanchuma Buber, Vayera 21:1
כתיב והוא באחד ומי ישיבנו ונפשו אותה ויעש (איוב כג יג), דרש ר' פפייס לפי שהוא יחיד בעולמו ואין מי שימחה בידו, כל מה שהוא מבקש הוא עושה, א"ל ר' עקיבא דייך פפייס אין דורשין כאן, אלא הכל עושה בדין, ומהו באחד אלא כשם שהשואל שואל למן כך למעלן, וכשם שהסנהדרין נושאין ונותין למטן כך למעלן, שנאמר ראיתי את ה' יושב על כסאו וכל צבא השמים (עומדין) [עמד] עליו מימינו ומשמאלו (מ"א כב יט), וכי שמאל (וימין) למעלה, והלא כבר נאמר ימינך ה' נאדרי בכח (שמות טו ו), אלא אלו מטין לכף זכות, ואלו מטין לכף חובה, הרי הכל במשפט, וכשם שהשואל שואל למטן כך למעלן, מנין שכך אמר דניאל בגזירת עירין פתגמא (ובמאמר) [ומאמר] קדישין שאילתא (דניאל ד יד), ואתה אומר לפי שהוא יחיד בעולמו עושה כל מה שהוא מבקש, מהו והוא באחד, אמר ר' פנחס הכהן בר חמא על שהוא יחידי בעולמו יודע משפטן של בריותיו, [ר' יהודה הלוי ב"ר שלום על שהוא יחידי בעולם יודע דעתן של בריותיו], למי שהוא אומר לך בשליחותי ילך, הוי אומר ונפשו אותה ויעש (איוב כג יג), וכן ירמיה אמר נעטר אנכי (ירמיה א ו), א"ל הקב"ה אל תאמר נער אנכי (שם ז), ואף בסדום נשא ונתן בדינם וראה שהן חייבים כליה, ואחר כך שלח אותם להפכם, לכך נאמר ויבאו שני המלאכים סדומה.