(יז) וַֽיהֹוָ֖ה אָמָ֑ר הַֽמְכַסֶּ֤ה אֲנִי֙ מֵֽאַבְרָהָ֔ם אֲשֶׁ֖ר אֲנִ֥י עֹשֶֽׂה׃ (יח) וְאַ֨בְרָהָ֔ם הָי֧וֹ יִֽהְיֶ֛ה לְג֥וֹי גָּד֖וֹל וְעָצ֑וּם וְנִ֨בְרְכוּ־ב֔וֹ כֹּ֖ל גּוֹיֵ֥י הָאָֽרֶץ׃ (יט) כִּ֣י יְדַעְתִּ֗יו לְמַ֩עַן֩ אֲשֶׁ֨ר יְצַוֶּ֜ה אֶת־בָּנָ֤יו וְאֶת־בֵּיתוֹ֙ אַחֲרָ֔יו וְשָֽׁמְרוּ֙ דֶּ֣רֶךְ יְהֹוָ֔ה לַעֲשׂ֥וֹת צְדָקָ֖ה וּמִשְׁפָּ֑ט לְמַ֗עַן הָבִ֤יא יְהֹוָה֙ עַל־אַבְרָהָ֔ם אֵ֥ת אֲשֶׁר־דִּבֶּ֖ר עָלָֽיו׃
(כ) וַיֹּ֣אמֶר יְהֹוָ֔ה זַעֲקַ֛ת סְדֹ֥ם וַעֲמֹרָ֖ה כִּי־רָ֑בָּה וְחַ֨טָּאתָ֔ם כִּ֥י כָבְדָ֖ה מְאֹֽד׃ (כא) אֵֽרְדָה־נָּ֣א וְאֶרְאֶ֔ה הַכְּצַעֲקָתָ֛הּ הַבָּ֥אָה אֵלַ֖י עָשׂ֣וּ ׀ כָּלָ֑ה וְאִם־לֹ֖א אֵדָֽעָה׃
(כב) וַיִּפְנ֤וּ מִשָּׁם֙ הָֽאֲנָשִׁ֔ים וַיֵּלְכ֖וּ סְדֹ֑מָה וְאַ֨בְרָהָ֔ם עוֹדֶ֥נּוּ עֹמֵ֖ד לִפְנֵ֥י יְהֹוָֽה׃
(כג) וַיִּגַּ֥שׁ אַבְרָהָ֖ם וַיֹּאמַ֑ר הַאַ֣ף תִּסְפֶּ֔ה צַדִּ֖יק עִם־רָשָֽׁע׃ (כד) אוּלַ֥י יֵ֛שׁ חֲמִשִּׁ֥ים צַדִּיקִ֖ם בְּת֣וֹךְ הָעִ֑יר הַאַ֤ף תִּסְפֶּה֙ וְלֹא־תִשָּׂ֣א לַמָּק֔וֹם לְמַ֛עַן חֲמִשִּׁ֥ים הַצַּדִּיקִ֖ם אֲשֶׁ֥ר בְּקִרְבָּֽהּ׃ (כה) חָלִ֨לָה לְּךָ֜ מֵעֲשֹׂ֣ת ׀ כַּדָּבָ֣ר הַזֶּ֗ה לְהָמִ֤ית צַדִּיק֙ עִם־רָשָׁ֔ע וְהָיָ֥ה כַצַּדִּ֖יק כָּרָשָׁ֑ע חָלִ֣לָה לָּ֔ךְ הֲשֹׁפֵט֙ כׇּל־הָאָ֔רֶץ לֹ֥א יַעֲשֶׂ֖ה מִשְׁפָּֽט׃
(כו) וַיֹּ֣אמֶר יְהֹוָ֔ה אִם־אֶמְצָ֥א בִסְדֹ֛ם חֲמִשִּׁ֥ים צַדִּיקִ֖ם בְּת֣וֹךְ הָעִ֑יר וְנָשָׂ֥אתִי לְכׇל־הַמָּק֖וֹם בַּעֲבוּרָֽם׃
(לב) וַ֠יֹּ֠אמֶר אַל־נָ֞א יִ֤חַר לַֽאדֹנָי֙ וַאֲדַבְּרָ֣ה אַךְ־הַפַּ֔עַם אוּלַ֛י יִמָּצְא֥וּן שָׁ֖ם עֲשָׂרָ֑ה וַיֹּ֙אמֶר֙ לֹ֣א אַשְׁחִ֔ית בַּעֲב֖וּר הָעֲשָׂרָֽה׃ (לג) וַיֵּ֣לֶךְ יְהֹוָ֔ה כַּאֲשֶׁ֣ר כִּלָּ֔ה לְדַבֵּ֖ר אֶל־אַבְרָהָ֑ם וְאַבְרָהָ֖ם שָׁ֥ב לִמְקֹמֽוֹ׃
Nahum Sarna (JPS Torah Commentary): Abraham has reached the limit of the ability of a righteous individual to outweigh the cumulative evil of the community. Ten is a round and complete number that symbolizes totality. Ten persons thus constitute the minimum effective social entity.
כׇּל הַמְרַחֵם עַל הַבְּרִיּוֹת — בְּיָדוּעַ שֶׁהוּא מִזַּרְעוֹ שֶׁל אַבְרָהָם אָבִינוּ,
וְכׇל מִי שֶׁאֵינוֹ מְרַחֵם עַל הַבְּרִיּוֹת — בְּיָדוּעַ שֶׁאֵינוֹ מִזַּרְעוֹ שֶׁל אַבְרָהָם אָבִינוּ.
Anyone who has compassion for God’s creatures, it is known that he is of the descendants of Abraham, our father, and anyone who does not have compassion for God’s creatures, it is known that he is not of the descendants of Abraham, our father.
(1) Now the Human knew his wife Eve, and she conceived and bore Cain, saying....
(ב) רַ֚ק אֶתְכֶ֣ם יָדַ֔עְתִּי מִכֹּ֖ל מִשְׁפְּח֣וֹת הָאֲדָמָ֑ה עַל־כֵּן֙ אֶפְקֹ֣ד עֲלֵיכֶ֔ם אֵ֖ת כׇּל־עֲוֺנֹתֵיכֶֽם׃
(2) You alone have I singled out
Of all the families of the earth—
That is why I will call you to account
For all your iniquities.
.....................................................................
"singled out" = (Sarna) "Avraham had a special degree of intimacy with God," a unique relationship. That relationship could be ethical, sexual, intimate, etc..
The two Genesis stories about destruction - by the Flood and of fate of Sodom and Gemorah - do not consider the possibility of repentance, which is one of the themes of Jonah and, of course, a major objective of the Prophets.
(א) וַיְהִ֧י דְבַר־יְהֹוָ֛ה אֶל־יוֹנָ֖ה שֵׁנִ֥ית לֵאמֹֽר׃ (ב) ק֛וּם לֵ֥ךְ אֶל־נִֽינְוֵ֖ה הָעִ֣יר הַגְּדוֹלָ֑ה וּקְרָ֤א אֵלֶ֙יהָ֙ אֶת־הַקְּרִיאָ֔ה אֲשֶׁ֥ר אָנֹכִ֖י דֹּבֵ֥ר אֵלֶֽיךָ׃ (ג) וַיָּ֣קׇם יוֹנָ֗ה וַיֵּ֛לֶךְ אֶל־נִֽינְוֵ֖ה כִּדְבַ֣ר יְהֹוָ֑ה וְנִֽינְוֵ֗ה הָיְתָ֤ה עִיר־גְּדוֹלָה֙ לֵֽאלֹהִ֔ים מַהֲלַ֖ךְ שְׁלֹ֥שֶׁת יָמִֽים׃ (ד) וַיָּ֤חֶל יוֹנָה֙ לָב֣וֹא בָעִ֔יר מַהֲלַ֖ךְ י֣וֹם אֶחָ֑ד וַיִּקְרָא֙ וַיֹּאמַ֔ר ע֚וֹד אַרְבָּעִ֣ים י֔וֹם וְנִֽינְוֵ֖ה נֶהְפָּֽכֶת׃ (ה) וַֽיַּאֲמִ֛ינוּ אַנְשֵׁ֥י נִֽינְוֵ֖ה בֵּֽאלֹהִ֑ים וַיִּקְרְאוּ־צוֹם֙ וַיִּלְבְּשׁ֣וּ שַׂקִּ֔ים מִגְּדוֹלָ֖ם וְעַד־קְטַנָּֽם׃ (ו) וַיִּגַּ֤ע הַדָּבָר֙ אֶל־מֶ֣לֶךְ נִֽינְוֵ֔ה וַיָּ֙קׇם֙ מִכִּסְא֔וֹ וַיַּעֲבֵ֥ר אַדַּרְתּ֖וֹ מֵֽעָלָ֑יו וַיְכַ֣ס שַׂ֔ק וַיֵּ֖שֶׁב עַל־הָאֵֽפֶר׃ (ז) וַיַּזְעֵ֗ק וַיֹּ֙אמֶר֙ בְּנִֽינְוֵ֔ה מִטַּ֧עַם הַמֶּ֛לֶךְ וּגְדֹלָ֖יו לֵאמֹ֑ר הָאָדָ֨ם וְהַבְּהֵמָ֜ה הַבָּקָ֣ר וְהַצֹּ֗אן אַֽל־יִטְעֲמוּ֙ מְא֔וּמָה אַ֨ל־יִרְע֔וּ וּמַ֖יִם אַל־יִשְׁתּֽוּ׃ (ח) וְיִתְכַּסּ֣וּ שַׂקִּ֗ים הָֽאָדָם֙ וְהַבְּהֵמָ֔ה וְיִקְרְא֥וּ אֶל־אֱלֹהִ֖ים בְּחׇזְקָ֑ה וְיָשֻׁ֗בוּ אִ֚ישׁ מִדַּרְכּ֣וֹ הָֽרָעָ֔ה וּמִן־הֶחָמָ֖ס אֲשֶׁ֥ר בְּכַפֵּיהֶֽם׃ (ט) מִֽי־יוֹדֵ֣עַ יָשׁ֔וּב וְנִחַ֖ם הָאֱלֹהִ֑ים וְשָׁ֛ב מֵחֲר֥וֹן אַפּ֖וֹ וְלֹ֥א נֹאבֵֽד׃ (י) וַיַּ֤רְא הָֽאֱלֹהִים֙ אֶֽת־מַ֣עֲשֵׂיהֶ֔ם כִּי־שָׁ֖בוּ מִדַּרְכָּ֣ם הָרָעָ֑ה וַיִּנָּ֣חֶם הָאֱלֹהִ֗ים עַל־הָרָעָ֛ה אֲשֶׁר־דִּבֶּ֥ר לַעֲשׂוֹת־לָהֶ֖ם וְלֹ֥א עָשָֽׂה׃
(1) The word of GOD came to Jonah a second time: (2) “Go at once to Nineveh, that great city, and proclaim to it what I tell you.” (3) Jonah went at once to Nineveh in accordance with GOD’s command.
Nineveh was an enormously large cityaan enormously large city Lit. “a large city of God.” a three days’ walk across. (4) Jonah started out and made his way into the city the distance of one day’s walk, and proclaimed: “Forty days more, and Nineveh shall be overthrown!” (5) The people of Nineveh believed God. They proclaimed a fast, and great and small alike put on sackcloth. (6) When the news reached the king of Nineveh, he rose from his throne, took off his robe, put on sackcloth, and sat in ashes. (7) And he had the word cried through Nineveh: “By decree of the king and his nobles: No human or animal—of flock or herd—shall taste anything! They shall not graze, and they shall not drink water! (8) They shall be covered with sackcloth—human and animal—and shall cry mightily to God. Let everyone turn back from their own evil ways and from the injustice of which they are guilty. (9) Who knows but that God may turn and relent? [God] may turn back from wrathfulness, so that we do not perish.” (10) God saw what they did, how they were turning back from their evil ways. And God renounced the punishment that had been planned for them, and did not carry it out.
(א) אִם־בַּמַּחְתֶּ֛רֶת יִמָּצֵ֥א הַגַּנָּ֖ב וְהֻכָּ֣ה וָמֵ֑ת אֵ֥ין ל֖וֹ דָּמִֽים׃ (ב) אִם־זָרְחָ֥ה הַשֶּׁ֛מֶשׁ עָלָ֖יו דָּמִ֣ים ל֑וֹ ....
(1) If the thief is seized while tunneling*tunneling I.e., under a wall for housebreaking. and beaten to death, there is no bloodguilt in that case. (2) If the sun had already risen, there is bloodguilt in that case....
(1) אם במחתרת means when he was breaking in into the house....
(2) אין לו דמים THERE SHALL NO GUILT OF BLOOD BE INCURRED FOR HIM — This is not regarded as a murder; it is as though he (the thief) has been dead from the beginning of his criminal act. Here the Torah teaches you the rule: “If one comes with the intention of killing you, be quick and kill him”.
And this burglar actually came with the intention of killing you, for he knew full well that no one can hold himself in check, looking on whilst people are stealing his property before his eyes and doing nothing. He (the thief) therefore obviously came with this purpose in view — that in case the owner of the property would resist him, he would kill him (Sanhedrin 72a).