Seems pretty straightforward, you are telling the program to destroy a door and wait 2 seconds and create one..
So if you switch the group of the spawning will still occur if the wait is already in progress (which it always is ofcourse, because every 1.25 seconds you tell it to wait 2 seconds)..