The problem is that when an artist portrays, say, a sexist world in her books without condemning it, people will assimilate the ideas presented by the book, often without the proper amount of critique. To some extend, writing about a sexist or racist world means you're actively supporting that world view, by presenting it as normal. Showing people that what the book portrays is actually an abomination is the least one could ask from anyone, but apparently some are willing to help the GOP set us back to the dark ages in the name of litterary freedom...
If I write a book, it isn't my moral obligation to condemn every single thing in the book's world that I happen to think is wrong. Hell, if that were the case, I wouldn't be able to write a book taking place in the real world at all without bogging it down with so much moralization that the entire thing would be destroyed.
In fact, I feel that it does a great disservice to art that people feel the need to impose their morals upon
absolutely everything no matter what it is. Believe it or not, it's possible to write a novel taking place in the American South circa 1950 without incorporating any sort of anti-racism message, nor is one always necessary. I find it rather condescending and intellectual dishonest how, for instance, the protagonist of a work of fiction tends to be so morally and culturally sympathetic by the standards of the author/audience even if they're separated by extreme amounts of time and geography.
What's important is for the controversial elements to be portrayed realistically. It's okay if a character in a book is racist or sexist. It's not okay for his racism or sexism to be glorified by the author (although it may well be by other characters/groups in the book), or for it to be validated by unrealistic/stereotypical or unsympathetic treatment of the group that is the target of that injustice. Characters, groups, and other entities (fictional or not) can have bad points, and it's not the obligation of every single narrative work to condemn every single one of them.