Summary
Because while the War Doctor was leaving the message 'No More', the TARDIS was right there. And children are children, all over the universe, so when a lost little Gallifreyan finds one in the middle of a warzone, it will seem like a safe place to hide. It was only bad luck it was the Doctor's. Or good luck. It varies.