My guess is the first pass places every rock into a known location and the second one moves them to their correct spot. Assuming the machine starts out without knowing the total number of rocks this would make sense. You can't put any rocks into the right spot until you've seen all of them.
Surely a machine that can see rocks can see all the rocks without moving them. It might need to weigh them to measure density, but that still doesn't explain double sorting.
The description on the Vimeo video says "Intermediate, pre-sorted patterns are formed first, to make space for the final, ordered alignment of stones, defined by type and age."
ObRobot: ABB Robotics pickers are always good robotics porn ...
https://youtu.be/wg8YYuLLoM0?t=77