If the specification says that the order is "undefined", you cannot depend on the order without explicitly ordering it. The main implementation can be changed at any time with the new version or service pack, only for starters. Your dictionary can be taken from any number of specific implementations.
And the underlying implementation may be sensitive to the order of operations applied. Adding the keys "a", "b" and "c" in this order may lead to a different data structure than adding the same set of keys in a different order (for example, "b", "c" and "a",) . Deletions can also affect the data structure.
A direct binary tree, for example, if it is used as a data structure behind a dictionary, if keys are added in order, the result is a very unbalanced tree, which is essentially a linked list. The tree will be more balanced if the nodes are inserted at random.
And some morphological data structures are implemented. If, for example, a dictionary is implemented with a basic data structure that is a red / black tree, the tree nodes will be split / rotated to save the tree as insert and delete. Thus, the actual data structure is highly dependent on the order of operations, even if the final content is the same.
source share