The cause of the Egyptian exile was that they did not know what they lacked1 as is explained in the writings of the Arizal; for in the Egyptian exile, [their] da'at left them. Thus, the verse says about Moses (at the burning bush), "And G‑d saw that he turned to see". (Ex. 3:4)

Thus, they were in exile under the rule of Pharaoh, who is the aspect of the neck, which is the place of forgetfulness.2 Pharaoh said, "I do not know G‑d," which is the opposite of da'at. [The exile continued] until the aspect of Moses was revealed in the world, the aspect of da'at. Then, "the king of Egypt died" (ibid. 2:23) which is Pharaoh, the neck.

Forgetfulness was lifted, and the aspect of da'at came into the world.

Forgetfulness was lifted, and the aspect of da'at came into the world. Then they realized their shortcomings, and "The children of Israel cried out from their labor". (ibid.) They realized that they were lacking in the service of G‑d. "And their cries rose to G‑d from their labor." All of this was because of Moses: "And Moses was a shepherd".3 (ibid.)

Therefore, since the essence of the Egyptian exile was the removal of da'at, which was a spiritual exile, the aspect of forgetfulness and their inability to recognize their own shortcomings, it also became a physical exile. This is not true of one who recognizes his own shortcomings by means of da'at. For then, he can repent and fix what he lacks, and speed the final redemption.

[From Toldos Yaakov Yosef, Pekudei; translation and commentary by Rabbi Eliezer Shore; first posted on //baalshemtov.com.]