Objects with the same hash are placed in the same bucket in unordered associative containers. Therefore, two equal objects must have the same hash.
23.2.5 clause 8:
Unordered associative container elements are organized in buckets. Keys with the same hash code appear in the same bucket.
Bonus question: why can you move the buckets individually?
Bonus answer: because you want to process the contents of the container in parallel. The bucket iterators are independent of each other, so each thread can process the bucket without coordination (provided that no new entries are added to the container). And the buckets should be about the same size, so they provide a convenient parallelization quantum.
source share