Serbo-Croatian dialects have something like 20 million speakers in total.
It seems to be mainly about whether the widely adopted orthography was specifically designed with phonemicity in mind, and whether enough time has passed since then for the pronunciation to diverge (e.g. note Korean - Hangeul was perfectly phonemic when originally designed, but it isn't anymore after >500 years of language evolution). Modern orthographies are more likely to stick for longer though because speech is much more uniform today thanks to universal education and mass media.
It also helps when the government steps in. Serbo-Croatian is this way thanks to the efforts of Vuk Karadžić and Ljudevit Gaj being adopted by the corresponding ethnostates as official. Turkish Latin orthography was literally designed by committee to pursue a political goal, and then heavily enforced top-down.
It seems to be mainly about whether the widely adopted orthography was specifically designed with phonemicity in mind, and whether enough time has passed since then for the pronunciation to diverge (e.g. note Korean - Hangeul was perfectly phonemic when originally designed, but it isn't anymore after >500 years of language evolution). Modern orthographies are more likely to stick for longer though because speech is much more uniform today thanks to universal education and mass media.
It also helps when the government steps in. Serbo-Croatian is this way thanks to the efforts of Vuk Karadžić and Ljudevit Gaj being adopted by the corresponding ethnostates as official. Turkish Latin orthography was literally designed by committee to pursue a political goal, and then heavily enforced top-down.