Today, when we have no offerings to call forth G‑d’s pleasure, fasting replaces the offering. As the Talmud says, the prayer of one who is fasting is: “May my loss of fat and blood brought about through fasting be regarded as though I had offered it to You [as a sacrifice on the altar].”7
וְעַכְשָׁיו, שֶׁאֵין לָנוּ קָרְבָּן לְהָפִיק רָצוֹן מֵה' – הַתַּעֲנִית הוּא בִּמְקוֹם קָרְבָּן, כְּמוֹ שֶׁכָּתוּב בַּגְּמָרָא "שֶׁיְּהֵא מִיעוּט חֶלְבִּי וְדָמִי שֶׁנִּתְמַעֵט – כְּאִלּוּ הִקְרַבְתִּי לְפָנֶיךָ וְכוּ'".
The purpose of fasting, then, is that one become acceptable to G‑d just as before the sin.
This is why there are many cases of Talmudic Sages who for some trivial fault underwent a great many fasts.
וְלָכֵן מָצִינוּ בְּכַמָּה תַּנָּאִים וְאַמוֹרָאִים, שֶׁעַל דָּבָר קַל הָיוּ מִתְעַנִּים תַּעֲנִיּוֹת הַרְבֵּה מְאֹד,
R. Elazar ben Azariah, for example, contended that a cow may go out wearing its strap between its horns on Shabbat while his colleagues prohibited it. Once, a neighbor’s cow went out with its strap, and R. Elazar did not protest. Because he did not support his colleagues’ view, he fasted so long that his teeth were blackened.8
כְּמוֹ רַבִּי אֶלְעָזָר בֶּן עֲזַרְיָה, שֶׁהָיָה מַתִּיר שֶׁתְּהֵא פָּרָה יוֹצְאָה בִּרְצוּעָה שֶׁבֵּין קַרְנֶיהָ בְּשַׁבָּת, וַחֲכָמִים אוֹסְרִים, וּפַעַם אַחַת יָצְאָה כֵּן פָּרָתוֹ שֶׁל שְׁכֶנְתּוֹ וְלֹא מִיחָה בָּהּ, וְהוּשְׁחֲרוּ שִׁינָּיו מִפְּנֵי הַצּוֹמוֹת עַל שֶׁלֹּא קִיֵּים דִּבְרֵי חֲבֵירָיו;
So, too, R. Joshua once remarked: “I am ashamed of your words, Beit Shammai.”9 His teeth, too, turned black through fasting.
וְכֵן רַבִּי יְהוֹשֻׁעַ, שֶׁאָמַר: "בּוֹשְׁנִי מִדִּבְרֵיכֶם בֵּית שַׁמַּאי", וְהוּשְׁחֲרוּ שִׁינָּיו מִפְּנֵי הַצּוֹמוֹת;
Likewise, Rav Huna, because his tefillin strap once turned over, endured forty fasts.10
וְרַב הוּנָא, פַּעַם אַחַת נִתְהַפְּכָה לוֹ רְצוּעָה שֶׁל תְּפִילִּין, וְהִתְעַנָּה מ' צוֹמוֹת;
Indeed, there are many such instances recorded about our Sages.
These fasts were not endured for the sake of repentance nor as self-inflicted suffering in order to complete a process of atonement; these were not sins of the kind that required this. The sole purpose of these fasts was to restore the bonds of love between the former sinner and his Maker.
On this basis, that fasting substitutes for an offering and as such has a place even when an individual does not need to undergo suffering in order to attain complete atonement,
וְעַל יְסוֹד זֶה,
the Arizal taught his disciples, according to the principles of the Kabbalah, the number of fasts for many transgressions,
לִימֵּד הָאֲרִיזַ"ל לְתַלְמִידָיו עַל פִּי חָכְמַת הָאֱמֶת, מִסְפַּר הַצּוֹמוֹת לְכַמָּה עֲוֹנוֹת וַחֲטָאִים,
even though they entail neither excision nor death by Divine agency—in which case suffering would be necessary.
אַף שֶׁאֵין בָּהֶן כָּרֵת וְלֹא מִיתָה בִּידֵי שָׁמַיִם,
Examples: for anger—151 fasts;
כְּמוֹ, עַל הַכַּעַס – קנ"א תַּעֲנִיּוֹת וְכוּ';
7. Cf. Berachot 17a.
8.Jerusalem Talmud, Beitzah 2:8.
10.Moed Katan 25a.