Throughout the Pokémon series, most Pokémon learn moves honestly - that is, they learn them naturally (such as by level-up). But some Pokémon, whether by error or dishonest cheating, learn moves they're not supposed to learn in the first place. These are known as "illegal" moves (not that...
Some Pokemon events use special cartridges to distribute Pokemon and/or special items. When the event is over, those cartridges are sent back to Nintendo and are disposed of, but a few slip through the cracks. People are able to obtain these carts and have an unlimited supply of the event...