In gen 1, your character is based on Ash and your rival's is based on Gary, and since they are Trainer and Rival, you can choose their names.
In gen 2, Red is based on Ash, and did EVERYTHING you did in gen 1 (started in Pallet town, defeated Team Rocket, became the champion, etc)and has his Pokemon (Pikachu, Snorlax, Charizard). Blue is based on Gary (but have different hair and clothes), and did also everything your rival did in gen 1 (also started in Pallet town, became the champion) and has your rival's Pokemons.
So, why do they have these names, instead of Ash an Gary, or one of the developers' names?