I once had a racist dog. She was adopted from a shelter. Nearly all of the employees at the shelter were black, so she learned to associate black faces with being in that unpleasant place.
Nothing more to it than that. But she would go absolutely berserk whenever a black person came to the door.
Quite possibly.
It is also quite possibly true that there is sufficient difference in body odor that dogs used to being around white people react negatively to people with a distinctively different odor than those they view as their pack.
The question is theoretically subject to a scientific study for determination.
It is notable that one of the main Chinese/Japanese reasons for aversion to white people is that they think we stink. Haven't heard anybody denounce them for racism for feeling that way.
But I don't understand why an African-American wouldn't want to be the vet for my little girl. Well mannered, very loving and protective. Obeys commands and just a little peach to snuggle with when it's cold outside.
He can’t help it. He is wired that way.