Sorting is not always possible

There's an implicit assumption made by sorting algorithms that a list can be sorted.
However, some comparison functions are non-transitive.
Also, some comparison functions depend on factors outside the scope of the algorithm.
Rock beats Scissors, Scissors beat Paper, yet Paper beats Rock - sorting not possible.
Alpha can beat Beta this week, and lose next week.
That some call the comparison function "invariant" demonstrates how deep this assumption can go.

In general we don't worry about this - if the order changes with time we pretend that it doesn't and sort that way, or don't bother sorting in first place.
If you're tasked with sorting something that can't be, my advice is to feign ignorance and ask for more details about what order they want it in.
Write it down, and if possible, have them sign off on whatever comparison function they mention.