Any items in that list that have the same quantity will be randomly ordered. And the items get reordered every time there is an update to any item in the logistic system.
Notice the items with 1 and 2 quantities. They keep reordering every time a robot adds or removes something from the logistic system.
Some sort of sorting should be applied after the sort by quantity, so everything is fairly stable and not constantly getting jumbled around in a very busy logistic system.
![Image](https://forums.factorio.com/images/ext/55247680da8c5b81d98742aea00b73f8.png)
-
![Image](https://forums.factorio.com/images/ext/6d7b0eccf7a4ee0c35584f007cd331a7.png)