Rabbi Abba bar Zavina said: Why was the death of Miriam placed next to the passage of the ashes of the red heifer? This teaches that just as the ashes of the heifer atone, so the death of Miriam atones. Rabbi Judan said: Why was the death of Aaron placed next to the breaking of the tablets? This teaches that it is as grievous before the Holy One, blessed be He, as the breaking of the tablets. Rabbi Hiyya bar Abba said: The sons of Aaron died on the first of Nisan, and why does He mention their death on the Day of Atonement? This teaches that just as the Day of Atonement atones, so the death of the righteous atones. And from where do we know that the Day of Atonement atones? As it is written, "For on this day He shall make atonement for you" (Leviticus 16:30). And from where do we know that the death of the righteous atones? As it is written, "And they buried the bones of Saul and Jonathan his son in the land of Benjamin, in Zela, in the tomb of Kish his father, and they did all that the king commanded, and after that God was entreated for the land" (2 Samuel 21:14). The end.
The Death of the Righteous Atones
Pesikta DeRav Kahana 26:11
[יא] א"ר אבא בר זבינא מפני מה ניסמכה מיתת מרים לפרשת אפר הפרה, אלא מלמד שכשם שאפר הפרה מכפר כך מיתת מרים מכפרת. א"ר יודן מפני מה נסמכה מיתת אהרן לשבור לוחות, אלא מלמד שהיא קשה לפני הקב"ה כשיבור לוחות. א"ר חייא בר אבא באחד בניסן מתו בניו של אהרן ומפני מה הוא מזכיר מיתתן ביום הכיפורים, אלא מלמד שכשם שיום הכיפורים מכפר כך מיתתן של צדיקים מכפרת. ומניין שיום הכיפורים מכפר, דכת' כי ביום הזה יכפר עליכם (ויקרא טז:ל). ומנין שמיתתם של צדיקים מכפרת, דכת' ויקברו את עצמות שאול ויהונתן בנו בארץ בנימין בצלע בקבר קיש אביו ויעשו ככל אשר צוה המלך ויעתר אלהים לארץ אחרי כן (שמואל ב' כא:יד). חסילה.