"For the LORD will not abandon His people, etc." (ibid. [1 Samuel 12:22]). One verse says, "For the LORD will not abandon His people for the sake of His great name," and another verse says, "[For the LORD will not abandon His people,] neither will He forsake His inheritance" (Psalms 94:14). Rabbi Shmuel bar Nachman said: Sometimes He acts for the sake of His name, and sometimes He acts for the sake of His people and His inheritance. Outside the Land — for His people and His inheritance; in the Land of Israel — for the sake of His great name. Rabbi Reuven said: He always acts for the sake of His name. This is what is written, "For Mine own sake, for Mine own sake, will I do it, etc." (Isaiah 48:11). "For the LORD has been pleased to make [you a people unto Himself], etc." — Rabbi Yehuda and Rabbi Nechemiah and the Rabbis. Rabbi Yehuda says: "Pleased" (ho'il) means nothing but "beginning," as you say, "And now let it please You (ho'el) to bless the house of Your servant, etc." (2 Samuel 7:29). Rabbi Nechemiah says: "Pleased" (ho'il) means nothing but "lodging," as you say, "Be content (ho'el), I pray you, and tarry all night, and let your heart be merry" (Judges 19:6). And the Rabbis say: "Pleased" (ho'il) means nothing but an oath, as you say, "And Moses was content (va-yo'el) to dwell with the man" (Exodus 2:21); "And Saul adjured (va-yo'el) the people, saying" (1 Samuel 14:24); "Be content (ho'el), and take two talents" (2 Kings 5:23). Rabbi Yehoshua of Sikhnin in the name of Rabbi Levi: "Pleased" (ho'il) means nothing but reproof, as you say, "And now be pleased (ho'ilu) to look upon me, etc." (Job 6:28).
Why the LORD Will Not Abandon His People in Midrash Shmuel
Midrash Shmuel 16:2
כי לא יטוש ה' את עמו וגו' (שם), כתוב אחד אומר כי לא יטוש ה' את עמו בעבור שמו הגדול, וכתוב אחד אומר [כי לא יטוש ה' עמו] ונחלתו לא יעזוב, (תהלים צ"ד י"ד), אמר רבי שמואל בר נחמן פעמים הוא עושה למען שמו, פעמים הוא עושה למען עמו ונחלתו, בחוצה לארץ בעמו ונחלתו, בארץ ישראל בעבור שמו הגדול, אמר רבי ראובן לעולם הוא עושה למען שמו, הדא היא דכתיב למעני למעני אעשה וגו' (ישעי' מ"ח י"א), כי הואיל ה' לעשות וגו' רבי יהודה ור' נחמי' ורבנין רבי יהודה אומר (אלא) אין הואלה אלא תחלה. כמה דאת אמר ועתה הואל וברך את בית עבדך וגו' (שמואל ב' ז' כ"ט), ר' נחמיה אומר אין הואלה אלא לינה, כמה דאת אמר הואל נא ולין ויטב לבך (שופטים י"ט ו'), ורבנין אמרי אין הואלה אלא שבועה, כמה דאת אמר ויואל משה לשבת את האיש (שמות ב' כ"א), ויואל שאול את העם לאמר (שמואל א' י"ד כ"ד), הואל וקח ככרים (מלכים ב' ה' כ"ג), ר' יהושע דסכנין בשם רבי לוי אין הואלה אלא תוכחה, כמה דאת אמר ועתה הואילו פנו בי וגו' (איוב ו' כ"ח).