Actually the pokemon cant damage your game. But the cheats from AR can. Most hacked pokemon cant enter random matchup. I tested some stuff with hacked pokemon on the old Diamond my cousin gave me. Hacked pokemon cant damage your game, they way you use to get them can.
e.x.If you use some codes to get lets say Giratina is not made from experts it may damage your game. But the giratina cant. Ninja is wrong the bad egg glitch can happen by using cheats not pokemon.