Professor oak remembers Ash from when he was a kid (Celebi movie) and that's the reason he gave ash pikachu cause I really doubt Oak only had one Charmander squirtle and bulbasaur. He probably caught pikachu recognized it as ash's pikachu and probably boxed it for so long that that is the reason pikachu never goes back in his pokeball cause it probably scared of being in a ball for another 20 years or something