When is Good Grammar Correct?

So let’s talk grammar. If you were writing for a college course or a college professor you might be expected to write perfect grammar. Less than perfect
might have disastrous consequences. But when you are writing novels good grammar may be more desirable than perfect grammar.
Huh?