Rabbi Abahu says: It is written: “Three pilgrimage festivals you shall hold a festival to Me during the year” (Exodus 23:14). The Holy One blessed be He established three pilgrimage festivals, and the Torah, due to the merit of the patriarchs, who would not come before the Holy One blessed be He empty-handed.2Therefore, in the merit of the forefathers, Israel keeps the three pilgrimage festivals, on which they are also commanded not to come before God empty-handed (Exodus 23:15).
Additionally, the fact that they have not forgotten the Torah is also due to the merit of the forefathers (Etz Yosef). Even in these generations, even though they are suffering, the Torah does not move from them, as it is stated: “They will not move from your mouth, or from the mouth of your descendants, or from the mouth of the descendants of your descendants…” (Isaiah 59:21). This is analogous to one who had a case come before the king, and he had advocates pleading on his behalf.
So too, if a person performs mitzvot, and he is a learned person and one who performs acts of kindness, when the [heavenly] accuser is standing and prosecuting, advocates are standing opposite him and speaking in [the man’s] favor, as it is stated: “A man’s giving expands him” (Proverbs 18:16). What he does with the poor assists him. That is why it is stated: “Happy is one who attends to the indigent; [the Lord will deliver him in times of trouble]” (Psalms 41:2).