Answer:
Authors may choose to write a character's thoughts or dialogue in a dialect to create a sense of authenticity, realism, or to convey the character's cultural or social background.
The use of dialect can also help to differentiate characters and give them unique voices, making them more memorable and distinct in the reader's mind. Additionally, writing in dialect can serve as a way to challenge the dominance of Standard English and highlight the diversity of language and culture in literature.
Regarding the specific example you provided, without more context, it is difficult to determine the author's intent and the significance of writing Gustus's thoughts in dialect. It may be useful to examine the character's background and context within the story to understand why the author made this choice.