As we all know, writers like to use their craft to make social commentary. What safer way is there to remark on a social, religious or political issue than to drag fictional people through the coals of said issue? It’s like holding up a mirror, but not quite as direct.
Why do we classify and categorize things and why has this practice seeped into the way we present our characters in certain types of stories? It all comes back to how we’re wired.