you may find comfort in knowing that in a mathematical sense, its reasonable to say 12am=0am.
this is because 12 hour clocks use modular arithmetic. doing arithmetic modulo 12 is basically the same thing as doing normal arithmetic with the whole numbers, except you add in the rule 12=0. for example, modulo 12, we have 15 = 3 + 12 = 0 + 3 = 3. (this explanation of modular arithmetic comes from viewing it as “normal addition” in a quotient ring.)
This, basically a lot of things were based on 12 in the olden times. But since the French were against everything British, including their imperial system they based their metric system on base 10. I heard there were even clocks in France that had only 10 hours
12 hours can be evenly split into halves, thirds, fourths and sixths, but naah, apparently is better to only have ten to split it into halves and fifths (who uses fifths anyway) is better right?
Everyone here assumes that midnight=12a.m. is valid everywhere but in a lot languages this is not the case (German and French just to name two). So maybe this is just something weird English speaking people do...