This behavior originates from the key look up algorithm in cpython static PyDictKeyEntry * lookdict(...) as written in the document:

The basic lookup function used by all operations. This is based on
Algorithm D from Knuth Vol. 3, Sec. 6.4. ... The initial probe index
is computed as hash mod the table size (which initially equals to 8).

At the beginning of every for loop, the dict_next function is called internally to resolve the address of the next element. The core of this function reads:

where i is the index of the C array which actually stores the values. As written above, the initial index of a key is calculated from hash(key)%table_size. The other element in the array is all set to NULL since the dict contains only one element in your test case.

Given the fact that hash(i)==i if i is an int, the memory layout of the dict in your example will be: