Who were the Eimim? Why were they called by that name?
Rashi: The 'Eimim', who were originally called Refa'im, 1 lived in Ar before Mo'av ousted them and took over their land. The Mo'avim called them 'Eimim' because their Eimah (dread) spread over whoever saw them.
Ramban: The Eimim are synonymous with the original Refa'im. 2
Why does the Torah mention the Eimim here?
Rashi: The Torah mentions them here to point out that Mo'av is not the Eretz Refa'im that Hashem gave to Avraham. If it were, He would not have given their land to the sons of Lot. 1
See also 3:13. See also Ramban, who queries Rashi from Pasuk 19, which implies that Hashem gave the inheritance of Avraham to the sons of Lot, as Rashi himself explained in Pasuk 5. Refer to 2:5:2:1.
Ramban: And by the same token, He gave the land of the Chori to the B'nei Eisav (Refer to 2:11:1:2) and some of the land of the Refa'im to the B'nei Amon, all three in a miraculous way - to the sons of Lot in honor of Avraham. Therefore, it was not correct for Yisrael to capture it from them. Refer also to 2:12:1:2**.