There isn't really an logic to it. It may simply be that the miner's node is set to a point where many of those unconfirmed transactions are rejected. Additionally, there are many many empty blocks that are mined. IIRC if all blocks had the same number of transactions, there would be no backlog and no blocks would ever be full. One of the easiest ways to increase capacity is to have miners not produce empty blocks.