And that was the goal of Amalek. The intoduce Sofek, doubt (which is the same numerical value as Amalek). And today, when we don't know who Amalek is anymore, that is the Amalek we need to obliterate. The Sofek, the doubt.
Then why did my rabbi mention Hamas in his Shabbat Zachor sermon? He's a black hat Litvish and put Right Wing politics into it.
Their are many things and aspects/ points of view that we can learn and do from the lessons of the Torah. When with Amalik for example their are different lessons and applications that we can learn even for today, and this is Torah and that is Torah. One aspect if like OdKahane said, and another is destroying those who want to kill us (who according to some opinions becomes like Amalik).
This rule is also for many other things, and sometimes it is influenced by the insight that a Rav can bring and the tradition, etc. For example drinking wine on Purim and not knowing the difference between "cursed in Haman and Blessed in Mordechi" - one point of view- the Kahanists would be to say that just as it is a mitzva to bless a Tzaddik like Mordechi, soo it is a mitzva to curse a Rasha, and sometimes we need wine that let the inward true self/ feelings come out and do the action. From anothe rpoint of view one might say that in a way we can bless haman because if it wasn't for him we wouldn't have turned to G-d and have reached a close relationship because we thought we would have ben killed and we turned to Him, but about Mordechi, since he was a Tzaddik, we also turned to him, which took a little bit away from our connection to G-d.
And their are many many other insights, etc. But what needs to be done is to incorporate the Midrash without forgetting the Pshat. Doing both, expecially the Pshat, and then moving on to deeper insights and understandings, where really many of these things aren't necessecarily contradictions or arguments, but just deeper insights and lessons.