In Babylonian times, 4,000 years ago, they had a sexagesimal (base 60) number system. This led them to favour multiples and divisions of 60. They developed the idea we still use today of a circle having 360 degrees, with subdivisions of 60 minutes and further subdivisions of 60 seconds.
They then applied the same system of minutes and seconds to subdivision of hours on the clock. They had 12 hours in the night (and the same in the day) to reflect the 12 signs of the Zodiac. And had 12 months for the same reason. And 12 divides into 360 exactly where 13 does not.
The root problem for a mathematically neat and exact number of days in a month ("moonth"), is that a lunar month is not an exact number of days and the root problem for a mathematically neat and exact number of days and months in a year, is that a solar year is not an exact number of days, either.
For why should large bodies spin on their axes or rotate around one another so as to suit our calculating systems?
The Babylonians liked the idea of a 360-day year, and so they had 12 months of 30 days but it didn't fit the reality of when rivers flooded and crops needed to be planted so they had an extra month of 30 days once every 6 years, to try and keep the calendar and the seasons roughly in phase.
The Romans developed a 365 day year with a Leap Year (the Julian Calendar) in 45 BC to tackle this issue another way.
In the Roman Year, March 1st was the first day of the year (and of spring) and February was the twelfth month of the year. So if adjustments needed to be made, it seemed easiest to make them to the last month of the year, We do the same when we add a leap second on, at 11.59 pm on December 31st, when it is decided we need one.
September is now the 9th month but "septem" means 7 and "octo" means 8 and "novem" means 9 and "decem" (decimal system) means 10. These months were however correctly numbered when the year began on March 1st and only "look wrong" since the year-start date became January 1st.
July and August are both 31 days so we don't have a long-short-alternation any more. These months were originally known as Quintus (5th) and Sextus (6th) before the Caesars became Roman Emperors.
Julius Caesar decided he would have Quintus named after himself, however and that is how we got July. Then Augustus Caesar decided he would have Sextus, then 30 days long, named after himself, and as he didn't want to be ourshadowed by Julius Caesar having a longer month than himself, he decided that he would add a day and make August 31 days long.
To add a day in the summer, he had to lose one elsewhere and so it seemed logical (least disruptive) to lop one off the last month, February, Which thereafter changed from being 29 days long (but 30 in Leap Years) to being 28 days long (but 29 in Leap Years).
The French Republican Calendar introduced in 1793 to coincide with the first Metric System in the world decided to revert to the Babylonian idea of 12 30-day months and to add 5 or 6 days inbetween them, by decree. They had 3 10-day weeks in a month, 100 seconds in a minute, 100 minutes in an hour and 10 hours in a day, too. But it didn't catch on, Abolished by Napoleon in 1806, it was briefly revived during the short-lived Paris Commune in 1871.
The old ways, 2,000 to 4,000 years old, as they now are, are perhaps now too deeply ingrained to change them and to command much popular support for making such changes.
Would you vote for there being 100 degrees in a circle and the right angle in a Right-Angled Triangle being 25 degrees?