IMHO They often say things that are quite disagreeable to the author. Sometimes authors are trying to show the ugliness in the world. Sometimes they are making a point. Sometimes they make up a character, put that character in a situation and try to imagine the words which would be said.