It is less likely to evenly split the dataset into two. It simply creates a list of permuted indices to sample the dataset into subsets, which doesn’t care about the classes. Say if random falls back to sequential, other classes are doom lost.
Check link 77 for original code.