Not at all. But if a writer should fail to do so, say, by writing a story with an evil character of some particular ethnic/religious/whatever group without
including a balancing good
character of the same group, that doesn't automatically make that writer a bigot, and that writer shouldn't have to apologize. I can't bring any to mind at the moment, of course, but I've seen the occasional outrage in the press calling something racist just because the bad guy is of some particular group. I find that nonsensical.