Referring to professors as "Dr." in news articles and other formal wrtiting

The question arises because English language, unlike, say, German, is generally not hospitable to more than one title being used before a person's name (either the full name or the surname). That means that, if a person holds more than one title, we have to choose which one to use. Normally, one would use the highest one, because the use of a particular title conversationally implicates that the person does not hold a higher one, and so may be mildly insulting to a person who does in fact hold a higher title. (Of course, if the person, out of modesty or friendliness, tells us to use a lower one, or to dispense with the titles altogether, that trumps the general rules of the language.)

When the titles that a person holds do not belong to the same hierarchy, it may, however, not be immediately obvious which one is higher. This is the case with professor and doctor: the former is bestowed on one by the university where one is employed, while the latter represents an academic degree, which one has independently of one's employment. The two titles thus belong to different dimensions, so to speak.

Nowadays, most universities would not even consider somebody for a job that carries the title of a professor, if the person does not hold a doctorate. On the other hand, there are quite a few people with doctoral degrees who do not have such jobs. Because of this, in most academic settings, professor is regarded as the higher title, and is thus used for all those who actually hold it, while doctor is used only for those who do not. In such settings, doctor would conversationally implicate, although it wouldn't logically imply, that the person is not a professor.

It is true that North American university students will usually use professor for anybody who teaches a course, but that is because they are not (and there is no reason why they should be) familiar with the subtleties of the hierarchy.

But although professor is generally regarded as a higher title than doctor, there could be some settings where it's the other way round. There are some institutions that will readily give the title of, say, an adjunct professor to a businessperson (without a doctoral degree) who teaches one course in its business school. At such a place doctor could be regarded as the higher title, as it is an indication of one's being a career academic.

Professors who are also medical doctors are generally addressed as doctors within the settings in which they actually attend to patients, presumably because professor could be confusing to the patients.

Although everybody whose title contains the word professor is now regarded as entitled to be addressed as a professor, in the past, until half a century or so ago, the standard practice in North America was to reserve that form of address for those who were full professors, and to not use it for those who were associate or assistant professors; they were addressed by whatever title they otherwise held, which was usually doctor. This old practice made North American forms of address roughly parallel to the forms of address based on the traditional British system of academic ranks, in which only the most senior academics hold the title of a professor (with others being readers, senior lecturers, lecturers). At that time it was not uncommon for North American students to address those who were teaching them as 'doctor so-and-so'. It is possible that the journalistic practice that the OP observed echoes that old practice.