Following this path, we will now explain the deeper implication of the teaching of the great Apter Rav, zy”a. How exactly does the “chukah” of the Parah purify us from the filth and tarnish that adheres to us as a result of the interaction with Amalek on Purim? Let us examine the skirmish with Amalek shortly after “yetzias Mitzrayim” (Devarim 25, 17): "זכור את אשר עשה לך עמלק בדרך בצאתכם ממצרים"—remember what Amalek did to you while you were departing from Egypt. Now, in Shiras HaYam it states emphatically that all the nations were deathly afraid of Yisrael at that time (Shemos 15, 15): "אז נבהלו אלופי אדום אילי מואב יאחזמו רעד נמוגו כל יושבי כנען"—then the chieftains of Edom were confounded, trembling gripped the powers of Moab, all the inhabitants of Cana’an dissolved. So, how did Amalek dare to approach and attack Yisrael without trepidation?
To answer this conundrum, we will introduce what the brilliant Rabbi of Sanz, zy”a, writes in Divrei Chaim (end of Emor): Amalek encompasses all fifty gates of tumah. We can suggest that this is the “remez” inherent in the passuk (Bamidbar 24, 20): "ראשית גוים עמלק ואחריתו עדי אובד"—Amalek is the first among nations, but its end will be eternal destruction. Since the klipah of Amalek is the “sha’ar hanun” of tumah, this qualifies Amalek as “the first among nations.” It is the leader and source of all the forces of tumah. “But its end will be eternal destruction,” since its ultimate and complete elimination will not occur until the end of days, when the “sha’ar hanun” of kedushah will be revealed.
Now, we are familiar with a concept that appears in the siddur of the Arizal, Siddur Rabbi Shabtai (Haggadah shel Pesach), explaining the passuk (Shemos 12, 39): "ולא יכלו להתמהמה"—and they could not delay. He explains that during galus Mitzrayim, Yisrael sank to the forty-ninth level of tumah. Had they delayed and remained there even one moment longer, they would have sunk to the “sha’ar hanun”—the fiftieth level of tumah. Then, they would never have left Mitzrayim.
The Shela hakadosh explains why sinking to the “sha’ar hanun” of tumah would have made it impossible for Yisrael to ever leave Mitzrayim based on a teaching in the Gemara (R.H. 21b): "חמישים שערי בינה נבראו בעולם וכולן ניתנו למשה חסר אחד שנאמר ותחסרהו מעט מאלקים"—fifty levels of “binah” were created in the universe, and they were all bestowed upon Moshe except for one, as it is stated (Tehillim 8, 6): “Yet You have made him only a little less than the divine.” In other words, Moshe Rabeinu was not granted access to the fiftieth level of “binah.”
We can now comprehend the malicious plan the wicked Amalek. They understood that Yisrael departed Mitzrayim prematurely to prevent them from sinking to the “sha’ar hanun” of tumah. For, in that event, Moshe—who did not possess the “sha’ar hanun” of kedushah—would not have been able to redeem them. Hence, Amalek figured that since it was the “sha’ar hanun” of tumah, as implied by the depiction "ראשית גוים עמלק", it was capable of confronting Yisrael and defeating them—despite Moshe’s incredible accomplishments.
This then is the allusion in the passuk: "זכור את אשר עשה לך עמלק בדרך בצאתכם במצרים". Remember what Amalek did ל"ך, whose gematria is “nun” (50), alluding to the fifty “sha’arei binah.” It schemed to overpower Yisrael by means of the “sha’ar hanun” of tumah as “they were departing Mitzrayim.” As explained, they figured that since Yisrael were forced to depart Mitzrayim prematurely, so that they would not sink to the “sha’ar hanun” of tumah; it could defeat them, since it was the “sha’ar hanun” of tumah.