The Doctor knows he’s a bit of a magpie, but he can’t help himself. Shiny objects, interesting things, bits of string… anything that catches his attention and doesn’t seem to belong to anyone somehow ends up in his pockets.
That’s the downside of having pockets that are bigger on the inside; even he doesn’t know exactly what’s in them. One in long a while he’ll have a clearout, rummaging around and rediscovering things he’d completely forgotten. There are probably drawers full of miscellaneous objects throughout the TARDIS, but still he can’t stop.
“Oooh, shiny!” And into his pocket it goes.