as told above, the "end event processing" is the reason why the "erase event" is skipped.
There are three different methods of ending events depending on what exactly you want to do, and they should not be mixed.
"end event processing" means "skip to the end of the event and ignore all commands below this one". It is used if you have a branching event where different things can happen, and you want the rest of the other commands ignored after one of the early branches has been selected.
As a result the event can be repeated many times with different effects, it will never vanish.
"erase event" means "delete event from memory only" - and it also means that the event is still part of the map and will be reloaded if the player leaves the map and returns.
This is often used for map initialisations, an event that does something on the map and then is deleted until the player returns to the map when that initialization is needed again.
"Switching off" is permanent and the only way to end autoruns or parallal processes that are supposed to be run only once. You basically have a second page on the event conditioned to a switch, and when the switch is turned on on the first page that page gets deactivated and the second page will become active (which may or may not contain other commands or a sprite).
Search the forum for tutorials on eventing and on page priority for details.