Whenever I go to a battle facility in emerald, my Pokemon become bad eggs! This is annoying, because I have now lost my mew AND my rayquaza.
When using the GameShark code for quick Day Care level-up, an invisible Bad Egg will appear in the party, which can be switched around using the PC and used in battle. Sometimes, the Bad Egg will take form of the silhouette of a Pokémon in the PC Box. However, attempting to view its summary screen will cause a game freeze. Alternatively, by using codes to capture wild Pokémon instantly, reducing their HP to 0 yet keeping the battle going, it will be sent to the PC instead as a Bad Egg. This Bad Egg can be removed from the game by picking up another Pokémon while it is held, then setting it back down. This Bad Egg appears differently; instead of an Egg in its status box, it is the "unseen Pokémon" image used in the Pokédex and by ???. Like ???, using it in battle will cause an instant white out (if used without any other Pokémon in the party). Bad Eggs can also occur if the player attempts to hack a Pokémon which has an illegal moveset, as the checksums will not add up correctly (as the checksum would use the Pokémon's normal moveset at that level as a check). In Emerald, when warp cheat codes are used to steal from the Battle Factory, an invisible Bad Egg appears in the 19th slot of the 1st box in the PC Storage. If a Pokémon is in that slot, it corrupts the Pokémon and merges into a proper Bad Egg.
Source: https://bulbapedia.bulbagarden.net/wiki/Bad_Egg
Do you use warp cheat codes?