By their actions and the way it worked, it seemed fairly clear to me that the trap was configured to that number of people or approximate total mass at the point it was triggered, or something along those lines, and it wasn't just a case of pushing Ruby out of the trap, she needed to be replaced. What puzzled me a bit I think is why The Doctor didn't immediately do that himself to save Ruby, leaving her stranded there might have been preferable to whatever fate she faced by remaining in the trap - he got her into that mess, and it seemed a bit selfish or not very quick thinking - but maybe whatshisface as the bounty hunter had a better understanding of how the trap worked which is why he was able/had knowledge about how to intervene to save Ruby? But yes, not terribly well explained.