"Where are Your former kindnesses, O Lord, which You swore to David in Your faithfulness" (Psalms 89:50). It is written, "And these are the last words of David" (II Samuel 23:1). The former ones — where are they? The beginning of one's deeds. He said to them: the Song forgives what is past. Rabbi Berekhiah and Rabbi Abba bar Kahana, in the name of Rabbi Eliezer, explained it concerning "And Moses caused Israel to journey from the Red Sea" (Exodus 15:22). Once Israel had come up from the Red Sea, Moses said to them: the beginning of one's deeds. He said to him: the Song forgives what is past. Rabbi Berekhiah in the name of Rabbi Abba bar Kahana: After the Song it is written, "And the children of Israel did evil in the eyes of the Lord" (Judges 6:1); before the Song it is written, "And the children of Israel again did evil in the eyes of the Lord" (Judges 4:1). The beginning of one's deeds — He said to them: the Song forgives what is past.
Why the Song of the Sea Wipes Away Israel's Earlier Sins
Midrash Shmuel 29:1
איה חסדיך הראשונים אדוני נשבעת לדוד באמונתיך (תהלים פ"ט נ') כתיב ואלה דברי דוד האחרונים (שמואל ב' כ"ג א'), הראשונים איכן הן, תחילת עשיה, אמר להן מחלה השירה לשעבר, רבי ברכיה ורבי אבא בר כהנא בשם רבי אליעזר פתר לה בויסע משה את ישראל מים סוף (שמות ט"ו כ"ב), כיון שעלו ישראל מים סוף אמר להם משה תחילת עשיה אמר לו מחלה השירה לשעבר, רבי ברכיה בשם רבי אבא בר כהנא (לפני) [לאחר] שירה כתיב ויעשו בני ישראל הרע בעיני ה' (שופטים ו' א'), (לאחר) [לפני] שירה כתיב ויוסיפו בני ישראל לעשות הרע בעיני ה' (שם ד' א'), תחילת עשיה, אמר להן שירה מחלה לשעבר.