Using the name "GO" is a red herring here and is not so strange as the fact that this is both recursive and self-modifying code. Generally, self-modifying code is not good to use because of the added complexity in maintenance.
Sure it works:
The script creates the proc with three steps inside.
The script runs the proc.
While running,
The proc alters itself to select NULL
The proc runs itself, returning the NULL
The proc drops itself.