AM and PM are "ante meridian" and "post meridian": before" and after. But 12 is on* the meridian; neither one. You can meaningfully say 12:00:01 am, or 11:59:59 pm, but for 12 sharp nobody can say whether am or pm is dark or day.
Airlines schedule flights at 12:01 for this reason.
0 was invented for a reason. This am/pm stuff is so confusing.
I’m no domain expert but I’m guessing flights are scheduled at 12:01am because people are bad at time. For instance some people would think 12am is the last minute of the previous day instead of the first minute of the next day. 12:01 removes the potential ambiguity.
There isn't a flight at midnight, but there are fewer flights then anyway, and it may be confusing to some which day the flight is on. Of course, the flights around midnight have departure times of 2350 and 0015.
And now we're back to the original problem.