Alistair isn't a racist... but the Landsmeet is.
Unless you were asleep through this game, I'm sure you noticed that a ruler who doesn't have the Landsmeet's approval is not a ruler for very long. E.g. Loghain, who gets voted off the throne (or defeated in a trial by combat) after the Landsmeet is officially called to depose him.
Alistair might not care for the whole "pure non-magic human noble blood heir" as a requisite to being a monarch, but the Bannorn does. And their contentment keeps him on the throne. He marries a non-human or a mage, they'll get angry and vote him off the throne, and/or the country will descend into power-grabbing and fighting again, at a time when stability and unity are most important.
After I put him on the throne he immediately ditches me, citing impossibility of heir between two grey wardens. My character would have abhorred at the lack of choice to murder Alistair on that spot, because my character had devoted herself to Alistair all upto that point. I didn't harden Alistair on purpose to see this.
Anyway, this isn't the case when you play a human female warden. Alistair shows concerns for the same problem, but female warden gets to stick with Alistair.
You mean you put him on the throne against his will (since he kept saying over and over how he doesn't want to be king, it doesn't mean anything to him, he'd rather stay with the Grey Wardens, he'd rather stay with you, and he questions how being king will affect your relationship), and you chose to ignore his wishes and put him in a position where he has to accept the throne or doom everyone to anarchy and chaos, then get pissy with him for doing what he's supposed to do as king?
Did your character put him on the throne because she "devoted herself to Alistair," or because she wanted to be queen? And somehow missed how the country is antsy for an heir (one of the controversies surrounding Calan's marriage to Anora, since five years of marriage produced no child) and how mages and non-humans are not considered "human monarch" material?