Another interpretation: the wicked, because their beginning is tranquility and their end is suffering, open with blessing and close with cursing; the righteous, because their beginning is suffering and their end is tranquility, open with cursing and close with blessing - "cursed be those who curse you, and blessed be those who bless you" (Genesis 27:29). "And it came to pass, as soon as Isaac had finished blessing Jacob, and Jacob had scarcely gone out" (Genesis 27:30). The portico of our father Isaac was open on both sides. And the rabbis say it was like an arena, the doors folding back behind them, and Jacob stood behind the door and went out, as it is written "scarcely gone out [yatzo yatza]" - he appeared to be going out and not going out. "And Esau his brother came in" - he came in armed. "And he also made savory food" (Genesis 27:31). This is what is written, "The spider [or lizard] you may grasp with the hands, yet it is in kings' palaces" (Proverbs 30:28). By what merit is the spider grasped with the hands? By the merit of those hands - "and he also made savory food." "Let my father arise" - the Holy One, blessed be He, said to Jacob, You said, and so on, as above.
Why the Righteous Open in Hardship and Close in Peace
Yalkut Shimoni on Torah 115:18
דָּבָר אַחֵר, הָרְשָׁעִים עַל יְדֵי שֶׁתְּחִלָתָן שַׁלְוָה וְסוֹפָן יִסּוּרִין פּוֹתְחִין בִּבְרָכָה וְחוֹתְמִין בִּקְלָלָה. הַצַּדִּיקִים עַל יְדֵי שֶׁתְּחִלָתָן יִסּוּרִין וְסוֹפָן שַׁלְוָה, פּוֹתְחִין בִּקְלָלָה וְחוֹתְמִין בִּבְרָכָה אֹרֲרֶיךָ אָרוּר וּמְבָרֲכֶיךָ בָּרוּךְ. (בראשית כז ל) וַיְהִי כַּאֲשֶׁר כִּלָּה יִצְחָק לְבָרֵךְ אֶת יַעֲקֹב וַיְהִי אַךְ יָצֹא יָצָא יַעֲקֹב, פִּילוֹנוֹ שֶׁל אָבִינוּ יִצְחָק מְפוּלָש הָיָה וְרַבָּנָן אַמְרֵי כְּמִין אִיסְטַדִימוּטָא הַדְּלָתוֹת הָיוּ נִכְפָּלוֹת לַאֲחוֹרֵיהֶן וְעָמַד לוֹ יַעֲקֹב אֲחוֹרֵי הַדֶּלֶת וְיָצָא, דִּכְתִיב אַךְ יָצֹא יָצָא יַעֲקֹב נִרְאָה יוֹצֵא וְאֵינוֹ יוֹצֵא וְעֵשָׂו אָחִיו בָּא יוֹצֵא מְזֻיָּן. (בראשית כז לא) וַיַּעַשׂ גַּם הוּא מַטְעַמִים, הֲדָא הוּא דִכְתִיב "שְׂמָמִית בְּיָדַיִם תְּתַפֵּשׂ וְהִיא בְּהֵיכְלֵי מֶלֶךְ" בְּאֵיזֶה זְכוּת הַשְׂמָמִית בְּיָדַיִם תְּתַפֵּשׂ, בִּזְכוּת אוֹתָן הַיָּדַיִם וַיַּעַשׂ גַּם הוּא מַטְעַמִים. יָקֻם אָבִי, אָמַר לֵיהּ הַקָּדוֹשׁ בָּרוּךְ הוּא לְיַעֲקֹב אַתָּה אָמַרְתָּ וְכוּ', כְּדִלְעֵיל.