Togepi was found as a Pokémon Egg by Ash in Grampa Canyon in Attack of the Prehistoric Pokémon. Ash, Misty, Brock, and Meowth fought over the Egg and competed to determine who would be the eventual owner. When the Egg hatched into Togepi, the first thing it saw was Misty, and it chose her as its Trainer, even though Ash won the tournament, thinking that she was its mother.
Source