It's a choice between the bigger and lesser bad choice. If they hadn't gave Aldmeri Dominion the smaller piece of southern Hammerfell, the enemy would have sooner or later taken all of it.
Actually, the Redguards proved otherwise. The Thalmor are still reeling from THAT mistake

Also, to clarify on the Xenophobia/Racism/Discrimination issue - The Stormcloak movement for the most part
is racist - They believe that Nords are superior to all others, and that Imperials, Bretons, Redguards, Orcs, Elves, Khajiit, and Argonians do not belong in Skyrim - even if they were born and raised there, with Skyrim's values.
The Imperials are
not racist - except against Khajiit, because everyone's jealous of the cat-people. They also don't have a problem with Religious Freedom - If they were against the worship of Talos, then
why the heck do their top commanders and leaders worship that particular god?Fortunately, General Tullius sent a Missive to the Battle-borns containing details of where Thorald Grey-Mane is being held, with implicit instruction to let a capable warrior who has no traceable ties to the Empire find and free the guy.