Actually, the TD approaches things sort of from the opposite angle. Instead of determining that a table needs to be broken, the TD determines how many tables are currently needed and which tables are the "best fit" for the current tournament situation. It then figures out how players need to move in order to achieve the new "best fit" arrangement. Figuring out the "best fit" actually boils down to a specialized sorting of the tables, where there are weights that determine the outcome of the sort, such as how many players are at a table, how many seats a table has, and if a table has been designated in the collapse order.
So, to answer your question, it's a combination of factors. Fewer people at a table is definitely one of those factors, so I think it's safe to say that, all other things being equal, a table with fewer players will be chosen to be collapsed first, removing the randomness in that case.