Why does the law ground protection of the stranger in 'you were strangers in Egypt'?

Because the verb Pharaoh used to afflict Israel is the same verb YHWH forbids Israel to use against the widow and orphan — making Israel's Egypt-memory the theological spine of all its social legislation.

The law states its motive twice. At Exodus 22:21: "a sojourner you must not maltreat (תּוֹנֶה, from H3238 יָנָה, yanah, Hiphil, 'to suppress violently') nor oppress (תִלְחָצֶנּוּ, from H3905 לָחַץ, lachats, 'to squeeze, press') — for sojourners you were in the land of Egypt." At Exodus 23:9, the same clause returns verbatim. The phrase גֵרִים הֱיִיתֶם בְּאֶרֶץ מִצְרָיִם — "sojourners you were in the land of Egypt" — appears in exactly four verses in the entire canon: Exodus 22:21, 23:9, Leviticus 19:34, and Deuteronomy 10:19. These are the only four places where H1616 (גֵּר, ger, "sojourner") and H4714 (Egypt) share a verse. That density is the textual signal: this clause is not background color — it is the law's spine.

But the ground is more precise than memory. The verb that holds the two texts together is H6031 עָנָה (anah, Piel stem, "to afflict with intentional, sustained force"). Exodus uses it six times, and four of those split between two contexts that the law deliberately links. In the Egypt-narrative: "so as to afflict it" (לְמַעַן עַנֹּתוֹ, Piel infinitive construct, Exo 1:11) and "the more they afflicted them" (יְעַנּוּ, Piel imperfect, Exo 1:12). In the widow-and-orphan prohibition: "you must not afflict" (לֹא תְעַנּוּן, Piel imperfect, Exo 22:22) and the emphatic double construction "if you really do afflict them" (עַנֵּה תְעַנֶּה, Piel infinitive absolute + imperfect, Exo 22:23). The Piel stem and the emphatic register match across both contexts. Pharaoh's program against Israel is named by the same verb, in the same morphological form, that YHWH forbids Israel to use against its own vulnerable.

This is the anah inversion: the verb of the oppressor becomes the forbidden verb of the oppressed. Israel is not merely asked to be kind to sojourners — it is prohibited from becoming Pharaoh. The law's logic is not sentiment but precedent: what God suffered for Israel to endure, Israel may not inflict on another.

The four Torah repetitions escalate in obligation. Exodus 22:21 is a prohibition (do not maltreat or oppress). Exodus 23:9 adds a rationale that deepens it: "you yourselves know the soul (H5315 נֶפֶשׁ, nephesh, "inner life") of the sojourner." Israel is not being asked to imagine what oppression feels like — it has lived it. Leviticus 19:34 shifts from prohibition to positive command: "love him as yourself — for you were sojourners in Egypt" (confirmed by the pre-Christ scrolls 1Q3 and 4Q26a). Deuteronomy 10:19 mirrors YHWH's own character as warrant: "YHWH loves the sojourner; you shall love the sojourner — for you were sojourners in Egypt" (confirmed by six distinct pre-Christ scrolls: 4Q128, 4Q138, 4Q150, 4Q151, 8Q4, and Xq1). What begins as a prohibition grounded in history ends as a positive command grounded in the character of God.

The structure implies that the Egypt-memory is not a passing rhetorical reference. Israel's standing condition before God, even in Canaan, is that of a sojourner: David prays, "a sojourner am I with you, a resident-alien like all my fathers" (Psa 39:12); the Chronicler echoes it (1Ch 29:15); and YHWH states it as the ground of land-law: "the land is mine, for you are sojourners and resident-aliens with me" (Lev 25:23). Egypt was one acute episode of a permanent truth. The ger in Israel is not a threat to be managed but a mirror — the person who stands precisely where Israel has always stood before God.

The prophets carry the enforcement. The triad of widow (H0490 אַלְמָנָה, almanah), orphan (H3490 יָתוֹם, yatom), and sojourner (H1616 ger) co-occurs in eighteen verses across six books. Zechariah and Malachi invoke the full vocabulary of Exodus 22 against Israel's social failure — "widow and orphan, sojourner and poor, do not oppress" (Zec 7:10); "a swift witness against those who thrust aside the sojourner" (Mal 3:5). When Jeremiah tests whether covenant life is real, it is the same triad that measures it (Jer 7:6).

The force of the anah connection is that it closes every escape from the law's demand. You cannot call the ger's suffering unfortunate and move on — because the text names what Israel did to the ger with the same word it uses for what Pharaoh did to Israel. To oppress the sojourner is not merely to fail a moral ideal. It is to repeat the act that made Israel cry out to God.

The full study on Exodus 22:18–23:13 traces the complete anah inversion, the escalating four-site repetition of the Egypt-memory clause, and the prophetic enforcement that carries the law's logic through the whole canon.