Why "sorting" is needed for simple random sampling Tutorials demonstrating simple random sampling, first list the full number of population members (i.e., sampling frame) in a column and then assign a random number from $0$ to $1$ from a uniform distribution to each.
Question: BUT WHY (as shown in this tutorials), before getting a sample (e.g., of $n = 40$) from our sampling frame we must "sort" the sampling frame based on the random numbers for each population member? (What role does sorting etc. play?)
 A: It should be emphasized that you don't need to sort in order to sample. The method given in the tutorial works, but it is extremely inefficient. It basically does $\Theta(n \log n)$ operations for what can be done in $\Theta(1)$.
If you can sample a random floating point number from 0 to 1, you can sample a random integer from 1 to n. And Excel can give you the value in a list at a specific index. You can use that for sampling.
(Note, though, that Excels tends to re-roll all random values whenever you do anything, so you'll want to copy the value of the random index before proceeding.)
A: Sorting a list of objects based on an accompanying set of IID continuous random variables (such as uniform random variables) is equivalent to shuffling those objects into a random order (i.e., by a random permutation).  Since the random values are independent continuous random variables, every possible permutation is equally likely, and that is the definition of simple random sampling.  This method is used in computer programs that have facilities to create pseudo-random numbers, but do not have an existing sampling function.
