The first time I saw Dogmeat with a teddy bear, he found it himself. We were exploring the cave under the Red Rocket, and I turned around and saw him playing with one. I think they really did a great job with the idle animations for Dogmeat. Makes him feel like a real dog when he yawns, sneezes, etc.
Whenever I find teddy bears now, I bring them back to Dogmeat.