It was used to determine intersection with arbitrary meshes, but below it was changed to test for intersection with the z=0 plane.
Initially I coded it so that it tested for intersection with the plane mesh like:

var collisions = ray.intersectObject( this.plane );

I probably left it there because we might want to test for a non z=0 terrain.