"Formal use" in France (not necessarily French-speaking countries) has a very specific tie to the Académie Française and its recommendations (as well as a few other institutionalised references for grammar, syntax etc. such as Grevisse).
As such, if you want to be in full conformity with the official French standard of French (and people who write in newspapers or textbooks usually want to), you follow the recommendations of the Académie, which has historically (over the past few decades, at least) gone with the strange habit of forcefully "frenchifying" the spelling of English neologisms, resulting in abhorrent (imho) French neologisms such as "mêl".
As pointed above, other countries (OK: mostly Québec) with a vested interest in preserving the perceived purity of their practice of French have adopted different localisation strategies, such as translating the concept, rather than the transliterating the word (e.g. "couriel" for "mail" instead of Franco-French "mêl", which makes considerably more sense, at least).
At the end of the day, this falls down to the usual prescriptivism vs. descriptivism debate. And while the norm in France leans firmly toward the former (Académie Française oblige), many educated people will step in to defend the latter approach as well.
The examples you give are technical, computer-related, words (which typically make the bulk of neologisms these days) and I think there is a strong professional bias amongst IT/computer-proficient people in France toward using unmodified English spelling, perhaps having to do with a higher English proficiency. In such circles (including in corporate contexts), using a spelling like "cédérom" instead of "CD-ROM" would make you sound somewhat "dated" or computer-illiterate, rather than formal (OK, using the word CD-ROM probably will do that anyway, but that's another issue entirely...).