The second king of Rome, Numa Pompilius, decided to make the calendar more accurate by syncing it up with the actual lunar year—which is about 354 days long. Numa tacked on two months—January and February—after December to account for the new days. The new months each had 28 days.
 The Roman calendar originally had only 10 months, beginning on March 1. (That's why "September" is named after "7", "October" after 8, "November" after 9, and "December" after 10.)  After December, there was just a long wasteland that nobody really cared about. In the earliest calendars, these were probably 29 day lunar months, but that got stretched out to 30 and 31 days over time.