And just how do you know Togepi's gender? How do you know it was female?
For one thing, Jessie remarked that if Attract worked on Meowth, it must be female. Then later, she concluded that since it
didn't work on Yanmega, it must be female as well. And Yanmega confirmed that. There was absolutely no indication that Jessie was wrong with either of her assumptions.
Brock also explicitly states that Attract just doesn't work against Pokémon of the same gender.
As for my personal opinion on this episode, there was some crazy stuff involved and I absolutely loved it.
It really felt like the script writer had a "lulz
" moment when he created this, especially with the spontaneous revelation that Yanmega is female.
I honestly doubt that it was planned that way from the getgo, but rather thrown in as another tidbit of roflcopterness after making sure that nothing in previous episodes would explicitly contradict that. Kiyotaka Furushima officially has the craziest roster of characters a VA voices now.