E-mails are kinda funny in the way they work. It’s not like a web page where you instantly (sorta) access the data. An e-mail, once it is created, typically goes into some sort of spooling system on the mail server where it basically gets queued up to be sent.
When it is sent, it doesn’t go straight from point A to point B, but instead follows a meandering path around the internet. Most e-mail programs hide the e-mail headers from you, but on most programs there is some way to look at the headers. In outlook, for example, you can click on File and then Properties, and the headers are down near the bottom. There’s a lot of junk in the headers, but one of the things in there is the path that the e-mail took. Note that this path can be easily spoofed, which spammers often do so that you can’t trace the e-mail back to their server.
Once the e-mail is received by your mail system, it also usually gets spooled again. Basically, the message gets queued up again so that it can be processed.
Your e-mail program will then check your e-mail queue periodically, so there can be an additional delay there.
If things show up out of order, it could be because something got queued up because the system was busy, on either the sending end or the receiving end. It could also be that one of the messages managed to find a faster path across the internet from one e-mail server to the other.
These days, the spooling and queuing is fairly minimal and fast, so most e-mails come through within seconds from when they were sent, maybe a minute or two if things are really busy. In the old days, when computers weren’t as fast and networks didn’t have as much bandwidth, e-mails could take hours to get from point A to point B.
We also had a problem with one system that I used where the e-mail server would occasionally spool an incoming message and would then forget about it. Since most messages came through, no one really noticed that it had a problem. After about six months, it finally completely filled up its disk and crashed. Once the system administrators figured out what was going on, they got it to unspool the messages, and everyone got six months of missing e-mails all at once.
Weird things can happen sometimes. Most of the time though, e-mails are pretty quick these days.