The Torah, “Leviticus” (Acharei Mot) 18:25-18:27: And the land became defiled, and I visited its sin upon it, and the land vomited out its inhabitants. But as for you, you shall observe My statutes and My ordinances, and you shall not do like any of these abominations neither the native, nor the stranger who sojourns among you. For the people of the land who preceded you, did all these abominations, and the land became defiled.
The Hebrew word “Eretz” (land) stems from the word “Ratzon” (desire). Those who obtain a desire that helps them focus them on the revelation of the Creator need to correct the laws that were broken.
A stranger is a person who acquires and adapts himself to a new level. He is still in his old desires, which are not on the new level yet, but he already enters the new level. Those who yearn for the Creator can be called strangers, which means that they only enter this level or that they already acquire that level called Israel, Yashar-El (straight to the Creator). Among them there are common folks, Levites and priests (Cohenim).
Thus, it says in the Torah: “For you were strangers…” but we were strangers in the land of Egypt since we had to go through it and to take the immense desires of Pharaoh from it. Only then was it possible to ascend to the levels of the spiritual worlds.
Without the descent to Egypt we wouldn’t have been able to acquire egoistic desires. All this work that is later described takes place after the exodus from Egypt, when a person absorbs all these desires and can already correct them.
It is because all the desires of incest and impurity that were taken from Egypt are corrected on the way to the ascent to a level called Eretz Israel (the land of Israel). This means that the corrected Egypt is called the land of Israel.
From KabTV’s “Secrets of the Eternal Book” 3/19/14