Consider learning about how associative arrays are typically implemented. Then you would see that there is no "inevitable" iteration order; one must be usually be chosen and implemented explicitly, which is extra complexity that many languages choose not to bother with.
It would take a deep dive into the subject that I'm not competent
to understand anyway. I take it on faith that it's more trouble
than it's worth. The naive view would be that the array ends up
as a block of data that has a beginning and an end and so when one
starts reading one will naturally start at the beginning. But I
suspect that it's far more complicated and I don't need to know
and wouldn't understand. Linked lists or something. Last write =
first read maybe. Doesn't matter.
https://en.wikipedia.org/wiki/Associative_array#Ordered_dictionary