It is being used as a current sink.
With the gate shorted to the source the drain current will be Idss which is the maximum current through the FET under normal conditions. Since this current is nearly constant over most of the range of drain to source voltages it can be used as a relatively stable constant current source or sink.
The current can also be set to a lower value by adding a resistor in series with the source.
simulate this circuit – Schematic created using CircuitLab
You can get constant current 'diodes' that are basically an FET in a two pin package with the source and gate shorted internally.