(Genesis 18:26) Abaye said: As for those who say, "What benefit have the rabbis brought us? For their own sake they read [Scripture], for their own sake they study [Mishnah]"—such a person is brazenly distorting the Torah, as it is written, "If not for My covenant by day and by night, I would not have set the statutes of heaven and earth" (Jeremiah 33:25). Rav Nachman bar Yitzchak said: From here too you may learn it [from the verse about Sodom], "and I will forgive the whole place for their sake" (Genesis 18:26).
The Torah Scholars Whose Merit Shields the Whole Place
Yalkut Shimoni on Torah 83:7
(בראשית יח כו) אָמַר אַבַּיֵּי, הָנֵי דְאָמְרֵי מַאי אַהֲנוּ לָן רַבָּנָן, לְדִידְהוּ קָרוּ, לְדִידְהוּ תָּנוּ, הֱוֵי מְגַלֶּה פָּנִים בַּתּוֹרָה דִּכְתִיב, (ירמיה לג, כה) "אִם לֹא בְרִיתִי יוֹמָם וָלָיְלָה חֻקּוֹת שָׁמַיִם וָאָרֶץ לֹא שָׂמְתִּי" אָמַר רַב נַחְמָן בַּר יִצְחָק, מֵהָכָא נָמִי שַׁמְעַתְּ מִינֵה וְנָשָׂאתִי לְכָל הַמָּקוֹם בַּעֲבוּרָם.