Because miners can choose which transaction will be added in block by themselves, so what if two miners broadcast two blocks almost at the same time, one is bigger(has more transactions), another is smaller. Which of the two blocks will be accepted?
Currently the Satoshi client will simply pick the one it sees first. Since most mining pools use the Satoshi client as their connection to the Bitcoin network they will build on top of the first block that is propagated to their node. The block that is propagated the furthest is therefore most likely to be the winner, i.e., the block that is part of the longest blockchain.
As you probably may have guessed there are also other strategies to pick the block to build on top. For example it might be the case that a block with more transactions offers more transaction fees to be claimed, hence a purely selfish miner may replace an earlier block with a new block that offers a higher reward. By that time however the miner has already spent some time trying to build a new block on top of the block with fewer fees, and it might have found a successor already.
So in the end, miners always work on the block they saw first (mining on top of an old block is rarely advantageous), and if they are selfish they may chose to replace their current base for a newer block if it offers more fees. Such a higher value block might however not be propagated to all miners, but that's another story.
For further information on how blocks are propagated in the network see a recent publication: Information Propagation in the Bitcoin Network (tik.ee.ethz.ch/file/49318d3f56c1d525aabf7fda78b23fc0/…) (disclaimer: I am author of that paper).– cdeckerNov 12, 2013 at 19:35
1Note that an academic paper (preprint) claims that this behavior creates a vulnerability. A mining pool could try to monopolize the network propagation by spawning many nodes, hence becoming able to greatly influence which blocks (its own ones!) more likely arrive first at some other miners, even if they initially withhold their own blocks. They propose to change miners' behavior to make a random choice on which valid block of equal maximum height to mine on.– user6049Nov 13, 2013 at 10:27
If two blocks are found simultaneously (and this is not very uncommon -- see http://blockchain.info/orphaned-blocks for some examples) nodes will consider whichever block they saw first to be the tip of the longest chain, and so miners will begin working on whichever block they saw first. The block that eventually becomes part of the longest chain is whichever block the next block is found on, that is, whichever block the miner who finds the next block sees first. The size of the blocks doesn't matter, besides the fact that a larger block will propagate more slowly, meaning that there's an increased chance of that block getting orphaned and not becoming part of the longest blockchain.