The ps code very carefully sorts first by controlling terminal number (unless told to sort by memory or CPU usage), then by PID. This is probably a documentation flaw (or possibly a failure to track a change), but it would probably also be nice if ps had an option to sort strictly by PID. (It would be trivial to implement, too.)