The reason it works is far simpler than it seems.
Essentially 2 calls are made:
1. Create a proc named "GO".
2. Execute that proc.
The code is loaded into memory when EXECuted. The loaded "in-memory" version of the code has no bearing on the PROC being created/modified/run/dropped, and as such remains unchanged.
The result set(s) and messages ultimately belong to the initial in-memory code EXECution, not the modified saved and re-executed instance(s).
Only when execution exits, does the code become vaporware.
The same is true about any PROC mod mid PROC. Changes do not operate until the next time the proc is called. For example, add another "EXEC GO" to the end of the code. You will get the same result, but also an error on the second EXEC, because it no longer exists to be loaded into memory and run again:
(1 row(s) affected)
Msg 2812, Level 16, State 62, Line 2
Could not find stored procedure 'GO'.
OK, maybe it doesn't sound simple... but the point is the initial code in memory is the control, everything else happens within that instance.