The Noam Elimelech says that the Torah is the furthest thing from a history lesson, and so these passages carry within them deep lessons. What kind of lessons? Mosheh Rabbeinu is showing us how to overcome our enemies. Even enemies such as Amon and Moav who had a connection with and the protection of Avraham Avinu, as well as Edom, who had the merit of the honor he showed his father Yitzhak Avinu. Because of their merits, we weren't permitted to war with them, so Mosheh Rabbeinu, in recounting their histories, tied them to the Sarim (the angelic rulers) of the nations they had defeated. In doing so, he uprooted their merits and opened the door to their ultimate destruction. Just as the Sarim had been defeated, so too would those who were tied to them be defeated.
This is a valuable lesson for us to understand the infinitely subtle and farsighted True Kindness of HaShem that is the driving force behind all of history. Our enemies today take on a name for themselves, not just any name, but the name of the nation who once inhabited our land. We don't have Mosheh Rabbeinu nowadays to tie our enemies to the fallen Sarim, so HaShem allows history to play out in such a way that it is done for us.
Just as the Plishtim, the Philistines fell before HaShem's first born, Yisrael, so too God-willing will the Palestinians (who chose to tie themselves to the name of a long dead idolatrous people, rather than to the merits of Yishmael) fall before HaShem's first born, Yisrael. Right now it seems like their name is a source of strength (a flag behind which many people may unite and gain recognition) but the time is approaching when it will become their undoing.
Speedily and in our days. Amen. Netzah. Selah. va'Ed.
[this is post #702 on this blog, gematria Shabbath שבת - may this post be an indication of the endless Shabbat to come, and may we all merit to experience it in HaShem's infinite mercy in our immediate future.]