The Sefer HaChinukh discusses the commandment to remember Amalek as not just a historical obligation but as a continuous moral imperative to combat evil and promote justice and good in the world.
לִזְכֹּר מָה שֶׁעָשָׂה לָנוּ עֲמָלֵק – שֶׁנִּצְטַוִּינוּ לִזְכֹּר מָה שֶׁעָשָׂה עֲמָלֵק לְיִשְׂרָאֵל, שֶׁהִתְחִיל לְהִתְגָּרוֹת בָּם בְּצֵאתָם מִמִּצְרַיִם, בְּטֶרֶם נָשָׂא גּוֹי וּמַמְלָכָה יָדוֹ עֲלֵיהֶם, וּכְעִנְיָן שֶׁכָּתוּב (במדבר כד, כ) רֵאשִׁית גּוֹיִם עֲמָלֵק. וְתַרְגּוּמוֹ, רֵישׁ קְרָבַיָּא דְּיִשְׂרָאֵל הֲוָה עֲמָלֵק, שֶׁהַכֹּל הָיוּ יְרֵאִים מֵהֶם בְּשָׁמְעָם הַיָּד הַגְּדֹלָה אֲשֶׁר עָשָׂה לָהֶם הַשֵּׁם בְּמִצְרַיִם, וְהָעֲמָלֵקִים בְּרֹעַ לִבָּם וּבְמִזְגָּם הָרַע לֹא שָׁתוּ לִבָּם לְכָל זֶה וַיִּתְגָּרוּ בָּם, וְהֶעֱבִירוּ מִתּוֹךְ כָּךְ יִרְאָתָם הַגְּדוֹלָה מִלֵּב שְׁאָר הָאֻמּוֹת, וּכְעִנְיָן שֶׁמָּשְׁלוּ בָּזֶה רַבּוֹתֵינוּ זִכְרוֹנָם לִבְרָכָה (פסיקתא רבתי פרשה יב תנחומא כאן) מָשָׁל לְיוֹרָה רוֹתַחַת שֶׁאֵין כָּל בְּרִיָּה יְכוֹלָה לֵרֵד לְתוֹכָהּ וּבָא אֶחָד וְקָפַץ וְיָרַד לְתוֹכָהּ, אַף עַל פִּי שֶׁנִּכְוָה הֵקֵר אוֹתָהּ לַאֲחֵרִים. וְעַל זְכִירַת עִנְיָנָם זֶה נֶאֱמַר (דברים כה יז) זָכוֹר אֵת אֲשֶׁר עָשָׂה לְךָ עֲמָלֵק בַּדֶּרֶךְ בְּצֵאתְכֶם מִמִּצְרָיִם. מִשָּׁרְשֵׁי הַמִּצְוָה. לָתֵת אֶל לִבֵּנוּ שֶׁכָּל הַמֵּצֵר לְיִשְׂרָאֵל שָׂנאוּי לִפְנֵי הַשֵּׁם בָּרוּךְ הוּא, וְכִי לְפִי רָעָתוֹ וְעָרְמַת רֹב נִזְקוֹ תִּהְיֶה מַפַּלְתּוֹ וְרָעָתוֹ, כְּמוֹ שֶׁאַתָּה מוֹצֵא בַּעֲמָלֵק כִּי מִפְּנֵי שֶׁעָשָׂה רָעָה גְּדוֹלָה לְיִשְׂרָאֵל שֶׁהִתְחִיל הוּא לְהַזִּיקָם, צִוָּנוּ בָּרוּךְ הוּא לְאַבֵּד זִכְרוֹ מִנִּי אֶרֶץ וּלְשָׁרֵשׁ אַחֲרָיו עַד כַּלֵּה (עי' ספהמ"צ להרמב"ם עשה קפט).
To remember what Amalek did to us: That we were commanded to remember what Amalek did to Israel — that he began to harass them when they left Egypt, before any other nation or kingdom raised their hand against them; and as the matter is stated, (Numbers 24:20) “Amalek is the first of nations.” Its [Aramaic] translation (Onkelos Numbers 24:20) is “The first battle of Israel was Amalek” — because everyone was afraid of them when they heard of God’s great hand that He used for them in Egypt. But the Amalekites, due to their evil hearts and evil disposition, did not turn their hearts to all of this, and harassed them [by waging war]. And as a result of this, Amalek was able to remove the great fear from the hearts of the other nations. And it is like the matter that our Rabbis, may their memory be blessed, analogized it (Pesikta Rabbati 12, Midrash Tanchuma on Devarim 25:17) to the analogy to a large boiling pot that no person could enter and [then] one [individual] comes and jumps and enters it. Even though he is burnt, he cools it for others. And about the memory of their matter is it stated (Deuteronomy 25:17), “Remember what Amalek did to you on your journey, after you left Egypt.” It is from the roots of this commandment [that it is] to put into our hearts that anyone who distresses Israel is despised in front of God, blessed be He; and that according to his evil and his great deceptive damage, will be his downfall and bad [occurrences], as you find with Amalek: That due to [the fact that] he committed a great evil to Israel — that he began to harm them — blessed be He, commanded us to “destroy his memory from the earth” and root it out after him, until its end. (See Sefer HaMitzvot, Positive Commandments 189.)