"Arabic" is not really a single language. it's regarded as such because of the pan-arabic movement but you can find many instances in which speakers of two Arabic "dialects" can barely understand each other. realistically treating Arabic as one language and all Arab languages as dialects is like treating latin languages as one and portuguese, spanish, italian and french as dialects.
however Arab countries found a way to agree on a common language, mostly to be used in media. this would be the closest to language used in the Quran, and the language used by the gulf countries. this isn't really a language any of them use as is but it is a good way to ensure they have a common way to understand each other. this is similar to western countries teaching Latin, only on a wider scale, and technically the language isn't dead because it is used in media like newspapers or some TV programming (although most tv programming would still use the local language)
so while each of these languages are evolving (in different directions even) they can still largely read and understand old books because they're taught as part of literacy. this is essentially the "formal language" which is different from the language people would use while speaking or texting for example.