Mandarin has been promoted since imperial Chinese times because the emperors, their administration and all officials wanted to understand each other without translators, hence Mandarin or 官话 (language of the officials or "Mandarins") was used when you wanted to communicate properly to officials more senior or junior to you and it thus became prestigious by association.
The reason why it is promoted so heavily to now and sometimes in a degrading manner towards local languages is so that Chinese people can actually communicate with each other even if they're not from the same region.
If you can only speak a local language and not something like Mandarin or occasionally Cantonese, you're looked down because it is like a US person who can't speak English and only some incomprehensible "redneck" language (pardon my rudeness, just an example).