What works the same for CM-2 as for FSRS relative overdueness. In both cases, the algorithm tries to provide, first of all, cards that you are less likely to remember.
CM-2
When using the SM-2 scheduler, overdueness is determined by comparing how overdue cards are, and how long their interval is. For example, a card with a current interval of 5 days that is overdue by 2 days, will display before a card with a current interval of 10 days that is overdue by 3 days.
FSRS
FSRS does not need to invent anything, it already has an R. Therefore, with this sort, it shows cards with less retrievability