Why do clocks have twelve numbers?
The short answer
The twelve-hour clock face grew from traditions that divided the day and night into cycles of twelve. Twelve is also convenient for dividing into halves, thirds, quarters, and sixths.
How it fits with 24 hours
Modern timekeeping uses a 24-hour day, but an analog clock shows a 12-hour cycle twice. Separating the morning and afternoon lets a compact dial represent the whole day. Digital clocks often use a 24-hour display instead.
Not every clock uses twelve
Twenty-four-hour dials and sundials use other displays. Twelve is not the only natural answer; it survived as a familiar and useful convention built through the history of timekeeping.