Usually this happens when two blocks are mined within a few seconds of each other.
Let's say you mine Block A and broadcast it. When I receive it, I need to verify it, verify all the transactions it contains, go through my mempool and remove all the transactions which are included in your block, and then go through my UTXO set and remove all the UTXOs which have just been spent in that block and update my set with all the new UTXOs created. I then need to pick a new set of unconfirmed transactions to place in to my candidate block which I am going to attempt to mine on top of Block A. All that takes time - usually just a few seconds, but time nonetheless. In the meantime, do I just have all my miner sitting idle? No, that would be a waste of money. Instead I have them attempt to mine Block B, which builds on top of Block A, but only contains a coinbase transaction to myself. They will only attempt to mine this block for a few seconds, until I update them with a new candidate block which is filled with transactions, but very rarely they are successful and find a block within those few seconds.