In journalism, reporters often “clean up” quotes so the person being quoted doesn’t look ignorant, and so the newspaper won’t be accused of making fun of someone’s speech.
But, in fiction, you want the opposite. You want the reader, after all, to have feelings (either positive or negative) about a character. And language is one way to do that.
Perhaps the most well-known example of that is Mark Twain’s “Huckleberry Finn,” in which Twain deliberately uses colloquial and what was sometimes considered coarse language to portray his characters. In later years, his books have been rewritten to exclude some characters’ use of the N-word for African-Americans – something that Twain included to show the rampant racism at the time. But regardless of that controversy, Twain masterfully uses the vernacular of that time and place throughout the novel, as when Huck says: “…we was always naked day and night, whenever the mosquitoes would let us—the new clothes Buck’s folks made for me was too good to be comfortable, and besides I didn’t go much on clothes, nohow.”
Grammatically, it’s all kinds of wrong. But as dialogue, it is perfect.
As a writer, this “wrongness” is not always easy to do. You need to have a very good ear for dialogue. Trying too hard to capture colloquialisms can result in something that sounds fake and stilted even. Some writers do this when trying to capture the words of a younger generation (which change so quickly anyway that it’s a risk to do that in a book).
I’ve also seen books in which Spanish words have been terribly misspelled or a piece of dialogue phrased incorrectly; in these instances, a native speaker really must be consulted. Spanish dialect is always tricky as words can take on different meanings from country to country. I use the example of Spanish dialogue because it’s the only other language in which I’m fluent, but the same goes for French or other languages commonly used in English-language novels.
You can, of course, write a fine novel, even a great novel, without colloquialisms, but it does add another authentic layer to a story. Have you ever used the vernacular of a place?