If anyone judges the author by what their characters do, there's something wrong with their ability to separate fiction from real life.
Obviously true, but it doesn't entirely address this specific instance.
Of course it's acceptable for characters to say offensive things, whether consciously or not. Nothing should be out of bounds for a character to say, and anybody arguing against that (which I'm not sure they were) should be ignored.
The difference here was that the author wasn't aware of the potential for offense in their word choice. The decision shouldn't be made from a position of ignorance, so I think it's useful for people to raise the matter with them.
If they still decide it's the right word, then fine, but at least they'll be making the decision from a position of knowledge.