מָה עָשָׂה הַקָּדוֹשׁ בָּרוּךְ הוּא — הֵבִיא יִסּוּרִים עַל חִזְקִיָּהוּ, וְאָמַר לוֹ לִישַׁעְיָהוּ: לֵךְ וּבַקֵּר אֶת הַחוֹלֶה. שֶׁנֶּאֱמַר: ״בַּיָּמִים הָהֵם חָלָה חִזְקִיָּהוּ לָמוּת וַיָּבֹא אֵלָיו יְשַׁעְיָהוּ בֶּן אָמוֹץ הַנָּבִיא וַיֹּאמֶר אֵלָיו כֹּה אָמַר ה׳ צְבָאוֹת צַו לְבֵיתֶךָ כִּי מֵת אַתָּה וְלֹא תִחְיֶה וְגוֹ׳״. מַאי ״כִּי מֵת אַתָּה וְלֹא תִחְיֶה״: מֵת אַתָּה — בָּעוֹלָם הַזֶּה, וְלֹא תִחְיֶה — לָעוֹלָם הַבָּא. אֲמַר לֵיהּ: מַאי כּוּלֵּי הַאי? אֲמַר לֵיהּ: מִשּׁוּם דְּלָא עֲסַקְתְּ בִּפְרִיָּה וּרְבִיָּה. אֲמַר לֵיהּ: מִשּׁוּם דַּחֲזַאי לִי בְּרוּחַ הַקֹּדֶשׁ דְּנָפְקִי מִינַּאי בְּנִין דְּלָא מְעַלּוּ. אֲמַר לֵיהּ: בַּהֲדֵי כַּבְשֵׁי דְרַחֲמָנָא לְמָה לָךְ? מַאי דְּמִפַּקְּדַתְּ אִיבְּעִי לָךְ לְמֶעְבַּד, וּמָה דְנִיחָא קַמֵּיהּ קוּדְשָׁא בְּרִיךְ הוּא — לַעֲבֵיד.
What did the Holy One, Blessed be He, do to effect compromise between Hezekiah and Isaiah? He brought the suffering of illness upon Hezekiah and told Isaiah: Go and visit the sick. I...Hezekiah said to him: What is all of this? For what transgression am I being punished? Isaiah said to him: Because you did not marry and engage in procreation. Hezekiah apologized and said: I had no children because I envisaged through divine inspiration that the children that emerge from me will not be virtuous. Hezekiah meant that he had seen that his children were destined to be evil. In fact, his son Menashe sinned extensively, and he thought it preferable to have no children at all. Isaiah said to him: Why do you involve yourself with the secrets of the Holy One, Blessed be He? That which you have been commanded, the mitzva of procreation, you are required to perform, and that which is acceptable in the eyes of the Holy One, Blessed be He, let Him perform, as He has so decided.
וְאָמַר רַבִּי יִצְחָק: אֵין דָּנִין אֶת הָאָדָם אֶלָּא לְפִי מַעֲשָׂיו שֶׁל אוֹתָהּ שָׁעָה, שֶׁנֶּאֱמַר: ״כִּי שָׁמַע אֱלֹהִים אֶל קוֹל הַנַּעַר בַּאֲשֶׁר הוּא שָׁם״.
And Rabbi Yitzḥak said: A man is judged only according to his deeds at the time of his judgment, and not according to his future deeds, as it is stated with regard to Ishmael: “For God has heard the voice of the lad where he is” (Genesis 21:17). Although Ishmael and his descendants would act wickedly in the future, his prayer was heard and answered because he was innocent at the time.
גמ׳ תניא רבי יוסי הגלילי אומר וכי מפני שאכל זה תרטימר בשר ושתה חצי לוג יין האיטלקי אמרה תורה יצא לבית דין ליסקל אלא הגיעה תורה לסוף דעתו של בן סורר ומורה שסוף מגמר נכסי אביו ומבקש למודו ואינו מוצא ויוצא לפרשת דרכים ומלסטם את הבריות אמרה תורה ימות זכאי ואל ימות חייב שמיתתן של רשעים הנאה להם והנאה לעולם ולצדיקים רע להם ורע לעולם
GEMARA: It is taught in a baraita that further elaborates upon the words of the mishna: Rabbi Yosei HaGelili says: Is it simply due to the fact that the boy ate a tarteimar of meat and drank a half-log of Italian wine that the Torah states that he shall be taken out to court to be stoned? Rather, the Torah penetrated the ultimate mind-set of the stubborn and rebellious son and the inevitable results of his actions, and it is understood that he will continue on this path, and in the end he will squander his father’s property, and then, seeking the pleasures to which he had become accustomed but not finding them, he will go out to the crossroads and rob people. The Torah said that it is better that he should die now when he is still innocent, and he should not die later when he is guilty. This is because the death of the wicked is beneficial to them and also beneficial to the world, while the death of the righteous is detrimental to them and detrimental to the world.