Rumour has it (and it’s only a rumour) that it is to do with the Roman God Jupiter. This was spelt “IVPPITER” in Latin. Hesitant to put part of the god's name on a sundial or in accounting books, IIII became the preferred representation of four. It is said that clockmakers may have stuck with IIII just for the sake of tradition.
Interestingly, one of the world’s most famous public clocks, that in “Big Ben” (or more properly the Elizabeth Tower) uses IV for four.