Probably some fuzzy thinking. 'for uses 'loop, and presumably pg was thinking that 'loop might change its characteristics (i.e. it might execute the init part more than once) in the future.
Really, there's a reason why a formal language spec (!= code) is useful...
You need to initialize v to nil so that it exists. The with binding creates a v that can be set. But you're right, there doesn't seem to be a reason you need the gensym.
The problem is that if you define it this way, then your v is no longer lexical; instead, it's in the global namespace. Thus, writing (for ref 0 n (frob ref)) would overwrite the global ref procedure, which is not what you want.