It randomizes slices of the sample and begins to play the slices in the random order. Meanwhile it begins the bubble sort algorithm at a pace that matches the tempo, sorting the slices into their chronological order. Throughout, it only plays the unsorted slices. (I was kinda hoping it would play the sorted sample at the end.)
I actually wanted it to play them as it went, so that it would be <unsorted><sorted> each time through, with the former shrinking and the latter growing.