Shemot13:17

וַיְהִי בְּשַׁלַּח פַּרְעֹה אֶת־הָעָם וְלֹא־נָחָם אֱלֹהִים דֶּרֶךְ אֶרֶץ פְּלִשְׁתִּים כִּי קָרוֹב הוּא כִּי אָמַר אֱלֹהִים פֶּן־יִנָּחֵם הָעָם בִּרְאֹתָם מִלְחָמָה וְשָׁבוּ מִצְרָיְמָה׃

And it came to pass, when Pharaoh let the people go, that the Almighty did not lead them by the way of the land of the Plishtim (Philistines), although it was near, for the Almighty said: "Lest the people change their minds when they see war, and return to Egypt."

Shemot 13:17

וַיְהִי בְּשַׁלַּח פַּרְעֹה

Shemot / Exodus 13:17 · Drash

Shemot 13:17

וַיְהִי בְּשַׁלַּח פַּרְעֹה אֶת־הָעָם וְלֹא־נָחָם אֱלֹהִים דֶּרֶךְ אֶרֶץ פְּלִשְׁתִּים כִּי קָרוֹב הוּא כִּי אָמַר אֱלֹהִים פֶּן־יִנָּחֵם הָעָם בִּרְאֹתָם מִלְחָמָה וְשָׁבוּ מִצְרָיְמָה׃

And it came to pass, when Pharaoh let the people go, that the Almighty did not lead them by the way of the land of the Plishtim (Philistines), although it was near, for the Almighty said: "Lest the people change their minds when they see war, and return to Egypt."

Drash דְּרָשׁ

Pharaoh sees them off

You argued with someone for a long time, and then he himself opened the door for you and saw you off to the threshold. The midrash notices: the Torah remembers not only the stubbornness, but this last step too.

Midrash Tanchuma: "let go" means "escorted". The mouth that said "I will not let go" said "I will let you go", and for this an Egyptian may not be abhorred. The mouth that said "I do not know the Eternal" said "the Eternal is righteous", and for this the Egyptians received burial. Tanchuma (Buber): whoever hardened himself against the Holy One, blessed is He, did not come out whole, and Pharaoh let the people go only after the plague of the firstborn.

How Midrash Tanchuma and Midrash Tanchuma (Buber) explain it

Midrash Tanchuma

"Let go": this letting go (שִׁלּוּחַ) is an escort (לְוָיָה), as it says: "And Avraham (Abraham) walked with them to see them off" (Bereshit / Genesis 18:16). And so it says: "And Yitzchak (Isaac) saw them off, and they went" (Bereshit / Genesis 26:31). Why does Scripture open with these words? The mouth that said: "I will not let go", turned and said: "I will let you go". Therefore it opens: "And it came to pass, when he let go". And what was his reward? "You shall not abhor an Egyptian" (Devarim / Deuteronomy 23:8).

The mouth that said: "I do not know the Eternal", turned and said: "The Eternal is righteous". And what was his reward? He gave them burial, as it says: "You stretched out Your right hand, the earth swallowed them" (Shemot / Exodus 15:12).

Midrash Tanchuma (Buber)

"And it came to pass, when Pharaoh let go" and so on (Shemot / Exodus 13:17). Of this Scripture says: "Wise of heart and mighty in strength, who has hardened himself against Him and come out whole?" (Iyov / Job 9:4). "Wise of heart" is the Holy One, blessed is He, as it says: "With Him are wisdom and might" (Iyov / Job 12:13).

"Who has hardened himself against Him and come out whole?" The generation of the Flood hardened themselves against Him, and He swept them away with water. The generation of the dispersion hardened themselves against Him, and He scattered them over the whole world. The people of Sodom hardened themselves against Him, and what was their end? "And the Eternal rained upon Sodom" (Bereshit / Genesis 19:24).

Pharaoh said: "Who is the Eternal?" (Shemot / Exodus 5:2), and the Holy One, blessed is He, said to him: "Let My people go" (Shemot / Exodus 5:1). And he too hardened himself, as it says: "And it came to pass, when Pharaoh stubbornly refused to let us go" (Shemot / Exodus 13:15). As soon as the plague of the firstborn came upon him, he let them go at once. Therefore it says: "And it came to pass, when Pharaoh let go" and so on.

Takeaway

The verb "let go" (שִׁלַּח) also means "escorted": so Avraham saw off his guests (Bereshit / Genesis 18:16).
Pharaoh's words the midrash points to: "I will not let go" and "who is the Eternal, I do not know the Eternal" (Shemot / Exodus 5:2), "I will let you go" (Shemot / Exodus 9:28), "the Eternal is righteous" (Shemot / Exodus 9:27).
"You shall not abhor an Egyptian, because you were a stranger in his land" (Devarim / Deuteronomy 23:8).
The generation of the dispersion (דּוֹר הַפַּלָּגָה) are the builders of the tower of Bavel (Babel), whom the Eternal scattered over all the earth (Bereshit / Genesis 11:8–9).