Asylum: a Jewish experience
(כ) וְגֵ֥ר לֹא־תוֹנֶ֖ה וְלֹ֣א תִלְחָצֶ֑נּוּ כִּֽי־גֵרִ֥ים הֱיִיתֶ֖ם בְּאֶ֥רֶץ מִצְרָֽיִם׃
(20) You shall not wrong a stranger or oppress him, for you were strangers in the land of Egypt.
(יא) וְשָׂמַחְתָּ֞ לִפְנֵ֣י ׀ ה' אֱלֹקֶ֗יךָ אַתָּ֨ה וּבִנְךָ֣ וּבִתֶּךָ֮ וְעַבְדְּךָ֣ וַאֲמָתֶךָ֒ וְהַלֵּוִי֙ אֲשֶׁ֣ר בִּשְׁעָרֶ֔יךָ וְהַגֵּ֛ר וְהַיָּת֥וֹם וְהָאַלְמָנָ֖ה אֲשֶׁ֣ר בְּקִרְבֶּ֑ךָ בַּמָּק֗וֹם אֲשֶׁ֤ר יִבְחַר֙ ה' אֱלֹקֶ֔יךָ לְשַׁכֵּ֥ן שְׁמ֖וֹ שָֽׁם׃ (יב) וְזָ֣כַרְתָּ֔ כִּי־עֶ֥בֶד הָיִ֖יתָ בְּמִצְרָ֑יִם וְשָׁמַרְתָּ֣ וְעָשִׂ֔יתָ אֶת־הַֽחֻקִּ֖ים הָאֵֽלֶּה׃ (פ)

(11) You shall rejoice before the Eternal your God with your son and daughter, your male and female slave, the Levite in your communities, and the stranger, the fatherless, and the widow in your midst, at the place where the Eternal your God will choose to establish God's name. (12) Bear in mind that you were slaves in Egypt, and take care to obey these laws.

Why does the Torah remind us here that we were strangers in Egypt? Many of us share a more recent history of being refugees. How does that affect our obligation towards today's refugees?

מאי דכתיב וגר לא תונה ולא תלחצנו כי גרים הייתם בארץ מצרים (תנינא) רבי נתן אומר מום שבך אל תאמר לחברך.

Why is it written: “And you shall not wrong a stranger or oppress him, because you were strangers in the land of Egypt?” We learned that Rabbi Natan says: A defect that is in you, do not mention it in another.

כי גרים הייתם כו' וידעתם צער הגר וכמ"ש ואתם ידעתם את נפש כו'.

Because you were strangers: and you know the sorrow of the stranger, and we learnt [in Exodus 23:9] you also know the soul of the stranger.

כי גרים הייתם בארץ מצרים לא הוכשרו כל הגרים בעבור היותנו גרים בארץ זמן, ואין טעם שיהיו מובטחים לעולם בעבור כן... כי אתה ידעת שהייתם גרים בארץ מצרים וראיתי את הלחץ אשר מצרים לוחצים אתכם ועשיתי בהם נקמה, כי אני רואה דמעת העשוקים אשר אין להם מנחם ומיד עושקיהם כח, ואני מציל כל אדם מיד חזק ממנו.

For you were strangers in the land of Egypt: Not all strangers are made fitting [just] because we were strangers in [one] land for a time. And there is no reason that they should be assured [of this treatment] forever because of this... You know that you were strangers in the land of Egypt, and you saw the oppression with which Egypt oppressed you and that I took vengeance for you, 'since I see the tear of the oppressed who has no comforter and has no power from the hand of their oppressors' [Ecclesiastes 4:1] and I save every person 'from the hand of one stronger than he' [Jeremiah 31:11].

Why does Ramban think we connect the commandment to our experience in Egypt?

וַאֲנִי יֵשׁ לִי אַרְבַּע בְּנֵי בַּיִת, הַלֵּוִי וְהַגֵּר וְהַיָּתוֹם וְהָאַלְמָנָה, שֶׁלִּי. וְכֻלָּן בְּפָסוּק אֶחָד. אִם אַתָּה מְשַׂמֵּחַ אֶת שֶׁלִּי וְאֶת שֶׁלְּךָ בַּבַּיִת בְּיָמִים טוֹבִים שֶׁנָּתַתִּי לְךָ, אַף אֲנִי מְשַׂמֵּחַ וְאֶת שֶׁלְּךָ.

And as for Me, I have four children in the house: “the Levite and the stranger, the orphan and the widow” [Deuteronomy 16:11] are mine. So they all are in a single verse. If you give joy to Mine during the festival days that I have given you, I will give joy to yours.