Why an antenna is used in this electronic electroscope circuit?
The antenna is used to pick up an electric field (not the same thing as a radio signal). It can be any length but I'd expect that the further away from the ground plane of the circuit the "stronger" a field you will get.

The "optional" 1Mohm resistor is really ought to be included otherwise you risk damaging the FET through electrostatic discharge.