At first glance, some may find the 24 hour number confusing or even arbitrary given that most other major measures of time, including seconds and minutes, are defined by 60 units. But the division of the day into 24 equal parts goes back to Ancient Egypt, which used stars as a way of dividing up the time in a day.
Egyptians used sundials to measure the day's progress while the sun was out, and during nighttime hours they used stars to measure the time, breaking down to a total of 12 units of daylight and 12 stars at night. The number 12 was important in other areas of Egyptian life. There were 12 lunar cycles within a year, and 12 counting joints in the hand, for example.