Devarim Rabbah 7:5
Devarim Rabbah 7:5
The passage presents an alternate interpretation stating that one should be blessed upon entering the world and blessed upon leaving it, with Rabbi Berekiah citing Kohelet's verse about times for birth and death to teach that a person is fortunate if their time of death is like their time of birth—just as one is innocent at birth, so too at death—thus one should be blessed both upon coming and upon going.
דָּבָר אַחֵר, בָּרוּךְ אַתָּה בְּבֹאֶךָ, בְּבִיאָתְךָ לָעוֹלָם, וּבָרוּךְ אַתָּה בְּצֵאתֶךָ, בִּיצִיאָתְךָ מִן הָעוֹלָם. אָמַר רַבִּי בֶּרֶכְיָה, כְּתִיב (קהלת ג, ב): עֵת לָלֶדֶת וְעֵת לָמוּת, וְכִי אֵין אָנוּ יוֹדְעִין שֶׁעֵת הוּא שֶׁאָדָם נוֹלַד וְעֵת הוּא שֶׁאָדָם מֵת, אֶלָּא אַשְׁרֵי אָדָם שֶׁעֵת מִיתָתוֹ כְּעֵת לֵדָתוֹ, מַה בִּשְׁעַת לֵדָתוֹ נָקִי, אַף בִּשְׁעַת מִיתָתוֹ נָקִי, הֱוֵי בָּרוּךְ אַתָּה בְּבֹאֶךָ וּבָרוּךְ אַתָּה בְּצֵאתֶךָ.