אָמַר רַב הוּנָא אָמַר רַב מִשּׁוּם רַבִּי מֵאִיר, וְכֵן תָּנָא מִשְּׁמֵיהּ דְּרַבִּי עֲקִיבָא: לְעוֹלָם יְהֵא אָדָם רָגִיל לוֹמַר: ״כׇּל דְּעָבֵיד רַחֲמָנָא לְטָב עָבֵיד״.
Rav Huna said that Rav said that Rabbi Meir said; and so it was taught in a baraita in the name of Rabbi Akiva: One must always accustom oneself to say: Everything that God does, He does for the best.
כִּי הָא דְּרַבִּי עֲקִיבָא דַּהֲוָה קָאָזֵיל בְּאוֹרְחָא. מְטָא לְהַהִיא מָתָא, בְּעָא אוּשְׁפִּיזָא לָא יָהֲבִי לֵיהּ. אֲמַר: ״כׇּל דְּעָבֵיד רַחֲמָנָא — לְטָב״. אֲזַל וּבָת בְּדַבְרָא, וַהֲוָה בַּהֲדֵיהּ תַּרְנְגוֹלָא וַחֲמָרָא וּשְׁרָגָא. אֲתָא זִיקָא כַּבְיֵיהּ לִשְׁרָגָא. אֲתָא שׁוּנָּרָא אַכְלֵיהּ לְתַרְנְגוֹלָא. אֲתָא אַרְיָה אַכְלֵיהּ לַחֲמָרָא. אֲמַר: ״כׇּל דְּעָבֵיד רַחֲמָנָא — לְטָב״. בֵּיהּ בְּלֵילְיָא אֲתָא גְּיָיסָא, שַׁבְיַיהּ לְמָתָא. אֲמַר לְהוּ: לָאו אֲמַרִי לְכוּ כׇּל מַה שֶּׁעוֹשֶׂה הַקָּדוֹשׁ בָּרוּךְ הוּא
The Gemara relates: Like this incident, when Rabbi Akiva was walking along the road and came to a certain city, he inquired about lodging and they did not give him any. He said: Everything that God does, He does for the best. He went and slept in a field, and he had with him a rooster, a donkey and a candle. A gust of wind came and extinguished the candle; a cat came and ate the rooster; and a lion came and ate the donkey. He said: Everything that God does, He does for the best. That night, an army came and took the city into captivity. It turned out that Rabbi Akiva alone, who was not in the city and had no lit candle, noisy rooster or donkey to give away his location, was saved. He said to them: Didn’t I tell you? Everything that God does,
הַכֹּל לְטוֹבָה.
He does for the best.
F. Nataf, "The Journey of the Jewish Nation: Hegel and Rabbi Akiva"
A nice story, but certainly one that rarely happens - and one that Rabbi Akiva knew, from his own life story, rarely happened. But then again, Rabbi Akiva was known for his mystical approach, looking to understand the meaning of things beyond surface appearances.
וכבר היה ר"ג ורבי אלעזר בן עזריה ורבי יהושע ורבי עקיבא מהלכין בדרך ושמעו קול המונה של רומי מפלטה [ברחוק] מאה ועשרים מיל והתחילו בוכין ורבי עקיבא משחק אמרו לו מפני מה אתה משחק אמר להם ואתם מפני מה אתם בוכים אמרו לו הללו כושיים שמשתחוים לעצבים ומקטרים לעבודת כוכבים יושבין בטח והשקט ואנו בית הדום רגלי אלהינו שרוף
§ Apropos tribulations of exile and hope for redemption, the Gemara relates: And it once was that Rabban Gamliel, Rabbi Elazar ben Azarya, Rabbi Yehoshua, and Rabbi Akiva were walking along the road in the Roman Empire, and they heard the sound of the multitudes of Rome from Puteoli at a distance of one hundred and twenty mil. The city was so large that they were able to hear its tumult from a great distance. And the other Sages began weeping and Rabbi Akiva was laughing. They said to him: For what reason are you laughing? Rabbi Akiva said to them: And you, for what reason are you weeping? They said to him: These gentiles, who bow to false gods and burn incense to idols, dwell securely and tranquilly in this colossal city, and for us, the House of the footstool of our God, the Temple, is burnt
באש ולא נבכה אמר להן לכך אני מצחק ומה לעוברי רצונו כך לעושי רצונו על אחת כמה וכמה
by fire, and shall we not weep? Rabbi Akiva said to them: That is why I am laughing. If for those who violate His will, the wicked, it is so and they are rewarded for the few good deeds they performed, for those who perform His will, all the more so will they be rewarded.
שוב פעם אחת היו עולין לירושלים כיון שהגיעו להר הצופים קרעו בגדיהם כיון שהגיעו להר הבית ראו שועל שיצא מבית קדשי הקדשים התחילו הן בוכין ור"ע מצחק אמרו לו מפני מה אתה מצחק אמר להם מפני מה אתם בוכים אמרו לו מקום שכתוב בו (במדבר א, נא) והזר הקרב יומת ועכשיו שועלים הלכו בו ולא נבכה
The Gemara relates another incident involving those Sages. On another occasion they were ascending to Jerusalem after the destruction of the Temple. When they arrived at Mount Scopus and saw the site of the Temple, they rent their garments in mourning, in keeping with halakhic practice. When they arrived at the Temple Mount, they saw a fox that emerged from the site of the Holy of Holies. They began weeping, and Rabbi Akiva was laughing. They said to him: For what reason are you laughing? Rabbi Akiva said to them: For what reason are you weeping? They said to him: This is the place concerning which it is written: “And the non-priest who approaches shall die” (Numbers 1:51), and now foxes walk in it; and shall we not weep?
אמר להן לכך אני מצחק דכתיב (ישעיהו ח, ב) ואעידה לי עדים נאמנים את אוריה הכהן ואת זכריה בן יברכיהו וכי מה ענין אוריה אצל זכריה אוריה במקדש ראשון וזכריה במקדש שני אלא תלה הכתוב נבואתו של זכריה בנבואתו של אוריה
Rabbi Akiva said to them: That is why I am laughing, as it is written, when God revealed the future to the prophet Isaiah: “And I will take to Me faithful witnesses to attest: Uriah the priest, and Zechariah the son of Jeberechiah” (Isaiah 8:2). Now what is the connection between Uriah and Zechariah? He clarifies the difficulty: Uriah prophesied during the First Temple period, and Zechariah prophesied during the Second Temple period, as he was among those who returned to Zion from Babylonia. Rather, the verse established that fulfillment of the prophecy of Zechariah is dependent on fulfillment of the prophecy of Uriah.
באוריה כתיב (מיכה ג, יב) לכן בגללכם ציון שדה תחרש [וגו'] בזכריה כתיב (זכריה ח, ד) עוד ישבו זקנים וזקנות ברחובות ירושלם עד שלא נתקיימה נבואתו של אוריה הייתי מתיירא שלא תתקיים נבואתו של זכריה עכשיו שנתקיימה נבואתו של אוריה בידוע שנבואתו של זכריה מתקיימת בלשון הזה אמרו לו עקיבא ניחמתנו עקיבא ניחמתנו:
In the prophecy of Uriah it is written: “Therefore, for your sake Zion shall be plowed as a field, and Jerusalem shall become rubble, and the Temple Mount as the high places of a forest” (Micah 3:12), where foxes are found. There is a rabbinic tradition that this was prophesied by Uriah. In the prophecy of Zechariah it is written: “There shall yet be elderly men and elderly women sitting in the streets of Jerusalem” (Zechariah 8:4). Until the prophecy of Uriah with regard to the destruction of the city was fulfilled I was afraid that the prophecy of Zechariah would not be fulfilled, as the two prophecies are linked. Now that the prophecy of Uriah was fulfilled, it is evident that the prophecy of Zechariah remains valid. The Gemara adds: The Sages said to him, employing this formulation: Akiva, you have comforted us; Akiva, you have comforted us.
Etz Yosef: Even though what is apparent in the words of Uriah is calamity... according to the truth, the prophecy of Uriah should be considered a good announcement. For it causes the realization... of Zechariah's good prophecy.
F. Nataf, "The Journey of the Jewish Nation: Hegel and Rabbi Akiva"
Regardless, we still need to understand why seeing the fulfillment of the destruction should actually console us and even bring joy to Rabbi Akiva. It could be that Rabbi Akiva saw that already on their way out of Egypt, the Jews chose the more likely path of living within natural human history, as opposed to living supernatural lives that would have put them outside of history. They made this choice by sending out the spies who would carry back an evil report of the land of Israel, and once they did so, there could no longer be any supernatural shortcut to the final redemption. The only way to accomplish the redemption would be by way of some level of destruction. And so, the sages say that with the crying over the spies' report came the inevitability of a crying for generations that is associated with the destruction of the Temple on that very same day of the year.