The Imperials are just as racist as the Stormcloaks don't kid yourself. Even in Imperial held cities Khajiit are not even allowed to enter the city and rent a room at an inn for a night much less buy a house. Anywhere in Skyrim. Under ANY Jarl. If thats not racism then what is?
The Thalmor are the puppet masters of the Empire and seek out to destroy the Nords and their culture. They kidnap, torture and murder on whims. No trials no one to keep them in check. The only person that can stop them is Ulfric. He may not be a perfect solution but he may be the best solution Skyrim has.
As far as segregating a population to minimize a potential threat during times of war, while it is not a socially acceptable solution it is not unheard of and is actually well documented as being used even by the
United States. War is war, it may not be a pleasant thought but when you don't know who your friends are you have to treat everyone like an enemy.