I grew up near Graz, in the south-east of Austria. The first language that I learned when I was a little child was the local dialect. This dialect has no genitive case, dative and accusative case are often merged into one case, the vocabulary is sometimes different, and the pronunciation is also very different.
When I was 6, I entered school and did not only learn how to write, I also learned a different pronunciation for the already well known words, for some words I learned new synonyms, I learned about genitive case, and how to make a difference between dative and accusative case.
But the most important thing:
When we were writing, we always and only had to write in the standard language, that was some kind of new language to me. This is the normal way how Children learn how to write. No child learns how to write dialect. So, we German native speakers are all used to write only in standard language, which is ok for most of us, because colloquial speech is not that far away from the standard.
There are no rules for orthography of dialects. My Grandfather Christian Schölnast was an author, and he also wrote a book in Mundart. ("Mundart" is synonym for dialect with an artistic connotation.) (Title of the book: »Warum sih der Hansl nit niedergsetzt hot«.) Although this book is written in the very first language I've learned, and although I still can communicate in this dialect, I find it really hard to read this book, because I'm not used to read German words in another version than in standard German.
There is also the phrase
Er spricht nach der Schrift.
He speaks as written.
This means, that someone is not speaking a dialect. This phrase shows, that most of us make a difference between the written standard German and the spoken local dialect.
This situation is even more extreme in Switzerland, where some years ago people said in a big survey, that about 80 % of the German native speakers in Switzerland feel that Standard German is a foreign language to them. Swiss people use two different variations of German Language: One for writing, and one for speaking.
But since the invention of social media people wanted to communicate with their friends in the same language that they used when they talked to them. And so, Swiss people began to write in their dialect also in social media, and since some years there is even a quasi-standard for orthography of Swiss Dialects.
This is different in Germany and Austria, because the colloquial speech in German and Austria is not so different from the standard as Swiss German.
About Arabic language
I'm not an expert for Arabic language, but as far as I know, there is one standard, that is spoken on the Arabic peninsula (Saudi Arabia and its neighbors), which also is similar to the language of the Quran. But in the countries in the north of Africa, people use variations of this standard Arabic, which sometimes are very different from the standard Arabic language. So the situation there is similar to Switzerland, where people use one language to write official documents, and another variation of the same language to communicate with friends. And in social media they want to use the language for spoken communication, but they have to write it. And so, they are writing in this language, although there are no official orthographic rules for this variation.