On this picture, I just got 2km egg from Pokestop. You can see that it is 4th in order.
My concern is, what determines in which order they are seen there?
Obvious thing is that the ones in incubator are always first, but then the rest is sorted by some hidden value, because it is obvious, that they are not sorted by distance needed nor time of acquisition.
According to some rumours, there MIGHT be the thing that eggs are predetermined by time you get them. So...
Is it possible that those are ordered by
- Level of pokémon they will hatch
- ID of pokémon they will hatch
- or just by some random seed they are using (if any is used)?
I know that I will need to hatch them all eventually, but if we can know what ones can yield better pokémons, we can hatch in some order that eventually can benefit to get the better pokémons after all (or faster). If the order is determined by the level when I got them, then hatching first the eggs with lower level can clear my inventory to get better eggs and similar.
I also found the table included here that shows which pokémon can be hatched from which egg and there are some overlaps (higher pokémon ID from lower egg), so that table is not against the possibility of order-by pokémon ID, preserving the possibility of misorder (by distance) in inventory.
To add, I have another screenshot, since the first one, I already hatched the in-progress 5km one, then did 2km egg, then I started to hatch one 5km egg (I think) from first line. You can see that I got another 5km egg that is sitting between 10km eggs.
I know that there might be no exact answer, because we probably cannot access the code, but there are communities that do incredible research and if there is possibility to get the answer for this, it can benefit a lot of players to hatch on demand. (For example the latter stored 2km egg, the higher chance for Magicarp, if stored by ID etc.)