Because the case of the MOSFET is connected to one of the terminals, and the case is also in electrical contact with the heat sink.
So, instead of connecting to that MOSFET terminal, they just connected to the heatsink.
With the lack of context you've given us, it's unlikely anyone will be able to give a definitive answer.
As shown, the circuit is worthless because 2 of the three terminals on the MOSFET aren't connected. If they were connected, one of the 3 terminals would be connected to the tab. The wire attached to the heatsink could be making an electrical connection to the tab.
It seems to me that a screw would be a more appropriate fastener than a nail.