12 Horites also used to live in Seir, but the descendants of Esau took over and destroyed them, the same as Israel did in the land God gave them to possess. 13 God said, "It's time now to cross the Brook Zered." So we crossed the Brook Zered. 14 It took us thirty-eight years to get from Kadesh Barnea to the Brook Zered. That's how long it took for the entire generation of soldiers from the camp to die off, as God had sworn they would. 15 God was relentless against them until the last one was gone from the camp. 16 When the last of these soldiers had died, 17 God said to me, 18 "This is the day you cut across the territory of Moab, at Ar. 19 When you approach the People of Ammon, don't try and pick a fight with them because I'm not giving you any of the land of the People of Ammon for yourselves - I've already given it to the People of Lot." 20 It is also considered to have once been the land of the Rephaites. Rephaites lived there long ago - the Ammonites called them Zamzummites (Barbarians) 21 - huge mobs of them, giants like the Anakites. God destroyed them and the Ammonites moved in and took over. 22 It was the same with the People of Esau who live in Seir - God got rid of the Horites who lived there earlier and they moved in and took over, as you can see.
Matthew Henry's Commentary on Deuteronomy 2:12-22
Commentary on Deuteronomy 2:8-23
(Read Deuteronomy 2:8-23)
We have the origin of the Moabites, Edomites, and Ammonites. Moses also gives an instance older than any of these; the Caphtorims drove the Avims out of their country. These revolutions show what uncertain things wordly possessions are. It was so of old, and ever will be so. Families decline, and from them estates are transferred to families that increase; so little continuance is there in these things. This is recorded to encourage the children of Israel. If the providence of God has done this for Moabites and Ammonites, much more would his promise do it for Israel, his peculiar people. Cautions are given not to meddle with Moabites and Ammonites. Even wicked men must not be wronged. God gives and preserves outward blessings to wicked men; these are not the best things, he has better in store for his own children.