"And the people thirsted there for water" (Exodus 17:3). But elsewhere what does it say? "And they came to Marah, and they could not drink the waters of Marah" (Exodus 15:23). Up to that point thirst had not yet touched them, but here thirst touched them, (and the people quarreled with Moses). From here Rabbi Joshua used to say: When the house has fallen, woe to the nail [when the strong are stricken, how much more the weak]. They put their cattle on a level with their own bodies. From here they said: A man's beast is his very life, for a man traveling on the road, if his beast is not with him, suffers greatly. "And Moses cried out" and so forth (Exodus 17:4). This is to make known the praise of Moses, that he did not say, Since they are quarreling with me I will not seek mercy on their behalf, but rather, "And Moses cried out to the LORD." He said before the Omnipresent: Master of the world, between You and them I am being killed. You told me not to be strict with them, as it is said, "For you say to me, Carry it in your bosom" (Numbers 11:12), yet they sought to kill me. "And the LORD said to Moses" (Exodus 17:5). Here the Omnipresent lowers and Moses raises; and elsewhere the Omnipresent raises and Moses lowers, as in the matter of which it is said, "And now leave Me alone" (Exodus 32:10), after which what does it say? "And Moses entreated" and so forth (Exodus 32:11).
Moses Prays for the People Who Sought to Stone Him
Yalkut Shimoni on Torah 261:17
(שמות יז ג) וַיִּצְמָא שָׁם הָעָם לַמַּיִם. וּבְמָקוֹם אַחֵר מַהוּ אוֹמֵר (שמות טו, כג) "וַיָּבֹאוּ מָרָתָה וְלֹא יָכְלוּ לִשְׁתֹּת מַיִם מִמָּרָה", עַד כַּאן לֹא נָגַע בָּהֶן צִמָּאוֹן, אֲבָל כַּאן נָגַע בָּהֶן צִמָּאוֹן, (וַיָּרֶב הָעָם עִם מֹשֶׁה) מִכַּאן הָיָה רַבִּי יְהוֹשֻׁעַ אוֹמֵר, נָפַל בֵּיתָא וַוי לָהּ לִכְוָותָא, הִשְׁווּ בְּהֶמְתָּן לְגוּפָן, מִכַּאן אָמְרוּ, בְּהֶמְתּוֹ שֶׁל אָדָם הוּא חַיָּיו, אָדָם הַמְהַלֵּךְ בַּדֶּרֶךְ אִם אֵין בְּהֶמְתּוֹ עִמּוֹ מִסְתַּגֵּף הוּא. (שמות יז ד) וַיִּצְעַק מֹשֶׁה וְגוֹ'. לְהוֹדִיעַ שִׁבְחוֹ שֶׁל מֹשֶׁה שֶׁלֹּא אָמַר הוֹאִיל וְהֵן מִדַּיְּנִין עִמִּי אֵינִי מְבַקֵּשׁ עֲלֵיהֶן רַחֲמִים, אֶלָּא וַיִּצְעַק מֹשֶׁה אֶל ה', אָמַר לִפְנֵי הַמָּקוֹם, רִבּוֹנוֹ שֶׁל עוֹלָם, בֵּינְךָ וּבֵינָם אֲנִי הָרוּג, אַתָּה אָמַרְתָּ אַל תַּקְפִּיד כְּנֶגְדָּן, שֶׁנֶּאֱמַר "כִּי תֹאמַר אֵלַי שָׂאֵהוּ בְחֵיקֶךָ", וְהֵם בִּקְּשׁוּ לְהָרְגֵנִי. (שמות יז ה) כַּאן הַמָּקוֹם מֵמִיךְ וּמשֶׁה מַגְבִּיהַּ, וּבְמָקוֹם אַחֵר הַמָּקוֹם מַגְבִּיהַּ וּמֹשֶׁה מֵמִיךְ. כְּעִנְיַן שֶׁנֶּאֱמַר (שמות לב, י) "וְעַתָּה הַנִּיחָה לִּי", אַחֲרָיו מַהוּ אוֹמֵר "וַיְחַל מֹשֶׁה" וְגוֹ'.