Since Pokemon RBG, when Prof Oak gave one of the three starters, if I had to guess :P
That said, I'm pretty sure that was a feature since the beginning (don't quote me on that), and it was to promote game players to interact with the overworld for small rewards.
If the gym leaders gave TMs/HMs or usable items, it makes sense that the other NPCs do too, for example the nuggets obtained by defeating Team Rocket grunts on Nugget Bridge.