The gimic of mew when it was released was it could learn EVERY TM/HM. This has continued, and attract is a TM. This quirk is touched upon in several pokedex entries:
Silver: Its DNA is said to contain the genetic codes of all Pokémon, so it can use all kinds of techniques
Crystal: Because it can learn any move, some people began research to see if it is the ancestor of all Pokémon
Fire Red: A POKéMON of South America that was thought to have been extinct. It is very intelligent and learns any move.