How does the time work?
Each hour in Minecraft is equal to 1000 Minecraft "ticks". The clock in Minecraft for a day starts at 6 AM at 0 ticks and ends at 5:59 AM on 23999 ticks. That said, Dawn is at 7 AM while Dusk is at 7 PM.
So why does the clock start at 6 AM, and why is dawn 1 hour later and not at the start? I'm not entirely sure, but from personal experience I get up to start getting ready for work at 6, the sun is at times starting to rise at 7 AM (seasons and the equinoxes need to be factored in).
I'm not sure if it's like that with the rest of the world or Sweden (I’m quite sure Mojang is based there) but we can assume that a 12-hour cycle is used so people don't complain about having more night than day when building on the surface.
You can read up more on Minecraft's day-night cycle here.
The actual system can get a bit detailed but I can give you an explanation about the numbers above. First, an in-game hour is 1000 of those units long. It runs on a 24 hour cycle as you would expect so the time goes from 0 to 23999. A complete cycle takes about 20min of real time and the translation between in game time and real time is where it can get detailed (you get into the 20 ingame ticks per second and things like that which is the rate at which the game checks to update the things around you) so I will skip it.
What is important to note here is that 0 is not Midnight like in real life. What you observed is correct, the sun comes up close to 0 instead of being the center of the night. Likewise the sun has set at 13000 and it is then considered night time. When you ask for Day or Night you are just asking for specific counts to when the sun is considered Up vs the moon being Up.
Hope this helps.