When P2Pool learns that there's a new block, it mines empty blocks until bitcoind gives it a block template.
The alternative to doing this would be to mine orphaned blocks rather than empty ones. :/
Blame bad coding not bitcoin.
Do it right like we do on ckpool and never mine empty blocks ...