When you sort the output of a Stack Exchange Data Explorer query by a column that contains duplicate values, any rows sharing the same value in the column will end up ordered semi-randomly relative to each other. Repeatedly sorting the data by the same column will cause the relative order of the rows to change. Here's a quick test to demonstrate this:
Note how the numbers are initially sorted in ascending numerical order, but sorting them by their parity ("even" or "odd") jumbles the relative order of the numbers having the same parity.
It would be much more useful if the sorting operation was stable, so that sorting data by a column would not change the relative order of rows that have the same value in that column.
To fix this, either the sorting code should be rewritten to use a naturally stable sorting algorithm (such as merge sort), or the sort should be stabilized by making the comparison function break ties based on the current order of the rows.
Ps. See also Stable sort in SlickGrid, a blog post from 2013 that I found on Google, discussing this very issue and how to solve it.