Current Regulator placement
The LM317 in this circuit is not being used as a voltage regulator. It's being used as a constant-current load. It's set up with a resistor in such a way as to always draw a constant amount of current from the MOSFET. In that configuration, the current flows through the LM317 In-to-OUT-to-ground.

But if the LM317 was set up in its normal way as a voltage regulator, then you're right, the supply would go to IN and the MOSFET would be connected to OUT.