Several areas in the game contain 'removable objects', or a list of sprites that can be permanently deleted from the area. This list includes all item balls, various NPCs such as the Team Rocket Grunts that block buildings in Saffron City, and, importantly, any one-time stationary wild Pokémon, such as the legendary birds. Whenever a player enters an area, if the area contains any removable objects, then the game will load the list from that area into memory.
Whenever the player encounters a wild Pokémon, the game checks to see if it was generated from a random encounter table. If it was not, then the game assumes that the player must be battling a one-time stationary encounter. When making this assumption, the game will automatically delete that stationary sprite from the list of removable objects for the area, to prevent the player from encountering the one-time Pokémon again.
The key is that a wild Pokémon encountered through the Mew glitch has not been generated from a random encounter table, and thus the game will assume that the player is battling a stationary encounter and attempt to delete a sprite. However, if the player is currently not in an area that contains any removable objects, the game will simply use whatever list is currently in memory - namely, the list from the most recent area the player was in that contained removable objects. This behavior can be used to bypass various obstacles in the game, most notably allowing the player to remove the Snorlax on Route 12 and thus skipping not only the Pokémon Tower in Lavender Town (as the player no longer has to pick up the Poké Flute), but also the entirety of Route 9, Route 10, and Rock Tunnel, as well as postponing the Cerulean Gym and the S.S. Anne until the end of the game (as the player no longer needs HM01 (Cut) to get access to Route 9).