The hash table for a Go map is structured as an array of buckets. The number of buckets is always equal to a power of 2. When a map operation is performed, such as (colors[“Black”] = “#000000”), a hash key is generated against the key that is specified. In this case the string “Black” is used to generate the hash key. The low order bits (LOB) of the generated hash key is used to select a bucket.

If we look inside any bucket, we will find two data structures. First, there is an array with the top 8 high order bits (HOB) from the same hash key that was used to select the bucket. This array distinguishes each individual key/value pair stored in the respective bucket. Second, there is an array of bytes that store the key/value pairs. The byte array packs all the keys and then all the values together for the respective bucket.

There is a reason the key/value pairs are packed like this in a single byte array. If the keys and values were stored like key/value/key/value, padding allocations between each key/value pair would be needed to maintain proper alignment boundaries.
When we are iterating through a map, the iterator walks through the array of buckets and then return the key/value pairs in the order they are laid out in the byte array. This is why maps are unsorted collections. The hash keys determines the walk order of the map because they determine which buckets each key/value pair will end up in.
https://www.ardanlabs.com/blog/2013/12/macro-view-of-map-internals-in-go.html
https://phati-sawant.medium.com/internals-of-map-in-golang-33db6e25b3f8
https://www.youtube.com/watch?v=Tl7mi9QmLns