Of course, the only reason it saw Misty first was because she snatched the egg out of Ash's hands. The moral of the story? Skill or caring matter less than being selfish at the most opportune time possible, because someone out there is dumb enough not to catch you.
Frankly, I love morals like this. I just really, really don't love Togepi.