אמר רב יהודה אמר רב בשעה שעלה משה למרום מצאו להקב"ה שיושב וקושר כתרים לאותיות אמר לפניו רבש"ע מי מעכב על ידך אמר לו אדם אחד יש שעתיד להיות בסוף כמה דורות ועקיבא בן יוסף שמו שעתיד לדרוש על כל קוץ וקוץ תילין תילין של הלכות אמר לפניו רבש"ע הראהו לי אמר לו חזור לאחורך הלך וישב בסוף שמונה שורות ולא היה יודע מה הן אומרים תשש כחו כיון שהגיע לדבר אחד אמרו לו תלמידיו רבי מנין לך אמר להן הלכה למשה מסיני נתיישבה דעתו חזר ובא לפני הקב"ה אמר לפניו רבונו של עולם יש לך אדם כזה ואתה נותן תורה ע"י אמר לו שתוק כך עלה במחשבה לפני אמר לפניו רבונו של עולם הראיתני תורתו הראני שכרו אמר לו חזור [לאחורך] חזר לאחוריו ראה ששוקלין בשרו במקולין אמר לפניו רבש"ע זו תורה וזו שכרה א"ל שתוק כך עלה במחשבה לפני
§ Rav Yehuda says that Rav says: When Moses ascended on High, he found the Holy One, Blessed be He, sitting and tying crowns on the letters of the Torah. Mosessaid before God: Master of the Universe, who is preventing You from giving the Torah without these additions? God said to him: There is a man who is destined to be born after several generations, and Akiva ben Yosef is his name; he is destined to derive from each and every thorn of these crowns mounds upon mounds of halakhot. It is for his sake that the crowns must be added to the letters of the Torah. Mosessaid before God: Master of the Universe, show him to me. God said to him: Return behind you.Moseswent and sat at the end of the eighth row in Rabbi Akiva’s study hall and did not understand what they were saying.Moses’ strength waned, as he thought his Torah knowledge was deficient. WhenRabbi Akivaarrived at the discussion of one matter, his students said to him: My teacher, from where do you derive this? Rabbi Akivasaid to them: It is a halakha transmitted to Moses from Sinai. When Moses heard this, his mind was put at ease, as this too was part of the Torah that he was to receive. Mosesreturned and came before the Holy One, Blessed be He, and said before Him: Master of the Universe, You have a man as great as this and yet You still choose to give the Torah through me. Why? God said to him: Be silent; this intention arose before Me.Mosessaid before God: Master of the Universe, You have shown meRabbi Akiva’s Torah, now show me his reward. God said to him: Return to where you were. Moseswent back and saw that they were weighingRabbi Akiva’s flesh in a butcher shop [bemakkulin], as Rabbi Akiva was tortured to death by the Romans. Mosessaid before Him: Master of the Universe, this is Torah and this is its reward? God said to him: Be silent; this intention arose before Me.
אָמַר רַב הוּנָא אָמַר רַב מִשּׁוּם רַבִּי מֵאִיר, וְכֵן תָּנָא מִשְּׁמֵיהּ דְּרַבִּי עֲקִיבָא: לְעוֹלָם יְהֵא אָדָם רָגִיל לוֹמַר: ״כׇּל דְּעָבֵיד רַחֲמָנָא לְטָב עָבֵיד״. כִּי הָא דְּרַבִּי עֲקִיבָא דַּהֲוָה קָאָזֵיל בְּאוֹרְחָא. מְטָא לְהַהִיא מָתָא, בְּעָא אוּשְׁפִּיזָא לָא יָהֲבִי לֵיהּ. אֲמַר: ״כׇּל דְּעָבֵיד רַחֲמָנָא — לְטָב״. אֲזַל וּבָת בְּדַבְרָא, וַהֲוָה בַּהֲדֵיהּ תַּרְנְגוֹלָא וַחֲמָרָא וּשְׁרָגָא. אֲתָא זִיקָא כַּבְיֵיהּ לִשְׁרָגָא. אֲתָא שׁוּנָּרָא אַכְלֵיהּ לְתַרְנְגוֹלָא. אֲתָא אַרְיָה אַכְלֵיהּ לַחֲמָרָא. אֲמַר: ״כׇּל דְּעָבֵיד רַחֲמָנָא — לְטָב״. בֵּיהּ בְּלֵילְיָא אֲתָא גְּיָיסָא, שַׁבְיַיהּ לְמָתָא. אֲמַר לְהוּ: לָאו אֲמַרִי לְכוּ כׇּל מַה שֶּׁעוֹשֶׂה הַקָּדוֹשׁ בָּרוּךְ הוּא הַכֹּל לְטוֹבָה.
Rav Huna said that Rav said that Rabbi Meir said; and so it was taught in a baraitain 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.

