What she said was rude and stupid, what you said was not rude and stupid. Good for you for saying something. I have battled with myself over the “I know I will not change their mind” issue in connection with whether to speak up or not (I almost always speak up).
I suppose that people who say blatantly racist things often are met with 1) agreement or 2) silence. Much less often, somebody disagrees. One reason for this is that birds of a feather flock together. The other reason is the one you describe – politeness, guest in house, etc. Therefore, I think people who say blatantly racist things generally go on obliviously and blithely through life, spouting their garbage, and not really getting called on it. More importantly, they get few opportunities to re-examine, in practice, their views. (Many people insist they are not “racist” but a thousand little examples from their lives would contradict them.)
So. With that in mind, I think of an analogy, an extreme one to make my point. Let’s say, for example, you lose your mind and ability to distinguish right from wrong. You decide, “I think I will kill a random stranger with an axe tomorrow.” You also decide to tell ten people of your plan. Of course, probably each of the ten people offers very negative feedback. “That’s a terrible idea. It’s against the law. You’ll go to jail. You should not kill people.” Luckily, the response makes you think twice. You go to the hospital and get help.
However, what if each of the ten people were afraid to say anything? What if, though each person found the idea abhorrent, you were in YOUR house when you said it, and the person didn’t want to be rude to his host? What if each person thought, “That’s awful! But he’s obviously not going to change his mind, so what’s the point of saying so?” If no one said anything, and you went and killed the person, in one way you couldn’t really be blamed. No one told you it was a bad idea, and after all, you told ten people. If it was so wrong, why didn’t they speak up?
So I think about it like this: I know I am probably not the one to change her mind. However, it will probably be good for her to know that the whole world does not feel the same way. It might even make her think twice about saying it out loud the next time, just because of the uncomfortable factor. It may help other people looking on whose views are still being shaped. So, unless there is some very good reason not to (an example of which I can’t think of right now), I usually speak up, even if just to calmly and pleasantly indicate that I disagree. So, good for you. I am glad you said what you said.