There are some clocks and sundials with 4 represented as IIII and some with IV.
This isn't just a clocks thing. Both methods of writing Roman numerals have been in use since the 1500s, possibly longer. Clock makers choose whichever number they feel is more aesthetically appealing and they often go with IIII because it balances better with VIII on the other side and makes the clock look more symmetrical. By the same token they use IX and not VIIII for 9 because it matches the III on the other side better.
Physicians traditionally use Roman numerals in lower case to specify the number of doses in a prescription. The lower case four(4) is usually written as iv, however, it can also be expressed as iiii - the explanation pharmacists often give, is they just count the dots on top - in other words, iiii instead of iv is for clarity. Perhaps more believable would be that it avoids confusion with the abbreviation "IV", which means intravenous, which could lead to a dangerous wrong drug administration route.
Using above rules:
MCMLXIV 1000-100+1000+50+10-1+5 = 1964
Here is the Roman way of writing 1964:
MCMLXIV 1000+(1000-100)+(50+10)+(5-1) = 1964
M CM LX IV
As you can see, Romans had to be very good at adding and subtracting!
Not using above rules:
MDCCCCLXIIII 1000+500+100+100+100+100+50+10+1+1+1+1 1964
We can see how Roman Numerals get really long as the numbers get larger and by using four of a given numeral the numbers get even more long (which makes Roman Numerals less useful).