Here is a picture from The Inland Paper (volume 24) [that you can find here].
Since the paper was to be published in 1900, the editors were asked to provide their opinion on the writing of the number of that year in Roman numerals:
Here the difference is all a matter of economy, since both the notations are exceptionally allowed.
The Pupils' Arithmetic (James Charles Byrnes, Julia Richman, John Storm Roberts,
Macmillan, 1917) says instead that the Romans preferred to write MDCCCC.
Now it is probably a matter of choice, or convenience. No one really knows the true reasons why the two writings became alternative to each other.
There's a similar problem on the writing of the Roman 4: IV or IIII? Some analog clocks prefer the second, and there are bunches of hypothesis and tales about the motives. We won't treat them, instead I leave to you this eloquent article!