The answer, honestly, is that the Romans had no fucking idea how to run a calendar.
Like, seriously, people notice "OCTOber" and "DECEMber" and say, "hey, those mean 'eight' and 'ten', but they're the 10th and 12th months, what's up with that?".
If you've got a little more history, you'll know that July and August are named after Julius and Augustus Caesar, and think, "oh, they added those two months and bumped the rest of the months back."