Here's why:
* Dialects have their own internal grammar. Every dialect, even those considered "non-standard," has its own consistent set of rules for grammar, pronunciation, and vocabulary. They are not simply random variations.
* Standard English is a dialect. It's the dialect that has gained prestige and is used in formal contexts, but it is still a dialect with its own unique characteristics.
* No dialect is inherently "ungrammatical." Each dialect is grammatically correct within its own system. Calling a dialect "ungrammatical" is essentially saying it doesn't follow the rules of a different dialect, which is not a fair or accurate assessment.
Think of it this way: Imagine two different languages. Would you say one is "ungrammatical" because it doesn't follow the rules of the other? Dialects are similar, just variations within the same language family.