From the website:
For some reason (there are a number of theories of why), 4 is sometimes written IV, and sometimes IIII. Where did this mess come from?
The roman numerals date back to shepherds, who counted their flocks by marking notches on their staffs. They didn't original use roman letters, but just notches on the staff.
So when counting their sheep, they would mark four notches; and then on the fifth one, they would cut a diagonal notch, the way that in tallying we commonly write four lines, and then a diagonal strike-through. But instead of striking through the preceding notches, they just used the diagonal to turn a "/" notch into "V". Every tenth notch was marked by a strike-through, so it looked like "X". Every tenth V got an extra overlapping notch, so it looked sort of like a ψ and every tenth "X" got an extra overlapping notch, so it looked like an X with a vertical line through the center.
In this system, if you had 8 sheep, that would be "IIIIVIII". But the leading IIII are not really needed. So you could just use "VIII" instead, which became important when you wanted to do a big number.