Add to that the Pokémon storage systems Professor Oak and that one guy in the light house worked out.
It changed it so that trainers didn't have to have all the Pokémon they ever caught with them and where other than home would they be keeping the ones they aren't keeping on hand?
Sure the Trainers of Pallet have Oak hang onto them but that's one town out of a continent. How many captured Pokémon are going to stay stored anyway I bet escapees who weren't really trained just caught could also help build up the number.