In a nutshell
Cyclic sort works only when the values are a known range like 1 to n, where every value has one correct home: value v belongs at index v−1. It walks the array and, whenever a value is in the wrong spot, swaps it straight home. Because each swap puts at least one value where it belongs, the whole thing sorts in one sweep with no comparisons.