Note the subtle use of italics to express emphasis in the title. 😀
Why do people persist in referring to Mandarin, Cantonese, Shanghainese, and so forth as dialects rather than languages? Actually, there are a couple of good explanations — “good” in the sense of explaining why people do this, not in the sense that they are correct in doing so. No one refers to English as a dialect of German, or Portuguese as a dialect of Spanish, so why is Cantonese called a dialect of Chinese? Before answering this, we ought to define our terminology. In general, if two people speak different languages, they can’t hold a smooth conversation in which one person speaks one language and the other the other (unless, of course, both participants speak both languages, but we’re talking about monolingual speakers). If two people speak different dialects of the same language, they might miss a few words but can generally hold a good conversation.
But that’s rather vague. For instance, can an Alabaman hold a conversation with a Mainer? Well, yes, for the most part, so the differences in their speech are a matter of dialects, not languages. But can that same Alabaman hold a conversation with a Scotsman? Maybe so, maybe no. Unfortunately it all gets tangled up with political boundaries as well. We say that Alabamans and Mainers speak the same language because Alabama and Maine are in the same country, but we say that Flemish and Dutch are different languages because they’re on opposite sides of the Belgium-Netherlands border, even though they’re clearly just dialects of the same language. As Max Weinreich famously put it, “אַ שפּראַך איז אַ דיאַלעקט מיט אַן אַרמיי און פֿלאָט” — or “a shprakh iz a dialekt mit an armey un flot” for those of you who can’t read the Hebrew letters in which Yiddish is conventionally written. What? You say you can’t read Yiddish even in the Roman alphabet? All right, all right, it says “a language is a dialect with an army and navy.” In other words, the distinction is political more than linguistic. But it does give one explanation for referring to Mandarin and Cantonese as dialects.
The other explanation is that Mandarin and Cantonese can be written in such a way that the same text can (more or less) be read in both languages. A spoken conversation may be impossible, but it could be conducted in writing — writing that doesn’t really reflect how people speak. Similarly, for instance, Malaysian and Indonesian can be written almost identically, even though the spoken languages are very different. Since Malaysia and Indonesia are different countries, we’re comfortable with referring to them as different languages, even if we (mistakenly) refer to Mandarin and Cantonese as dialects.
For more information from a Chinese POV, see Victor Mair’s informative essays, “Sinitic is a group of languages, not a single language” and “Cantonese is not the mother tongue of Hong Kongers.”