The reason for 12-hour clocks is most cultures worldwide have variable length hours of over a year. For Western times this comes from Greeks who had 12 day and 12 night hours. Early water clocks in antiquity would attempt to make that adjustment automatically.
Ehhhh, no. There are very important reasons we divide the time this way. 24 is a highly composite number (a number with more divisors than all numbers preceding it; like an opposite of a prime number). This allows us to easily divide the day into halves, thirds, quarters and sixths. So is 60, with even more divisors. My guess is the same thing goes for the switch from Roman to Julian calendar (ten to twelve months in a year)
The history of the calendar in Roman times is actually an entire topic to itself.
The pre-Julian calendar required fine tuning every year in winter to keep the rest of the months aligned with the seasons.
Technically not a difficult job to keep the calendar running smoothly and consistently, but the person in charge of the calendar in Rome was a politician, so they would play political games with the length of the year.
Caesar wanted a calendar that would run on auto-pilot to strip power away from those politicians.
By sheer coincidence when Caesar made his reform, during the the changeover of calendars while he was in charge, he got to rule over a 400+ day long year.
One benefit of base 12 and base 60 over base 10 for everyday use with things like time is simple factorization. You can divide 12 hours evenly into halves, thirds, quarters, and sixths, and 60 minutes evenly into halves, thirds, quarters, fifths, sixths, tenths, etc. With base 10, you've just got halves and fifths.