Simple transistor circuit with unconnected gate pin acts strangely
A floating gate has a voltage. Any wire has a voltage. Until you put it in reference to something else, that voltage can be anything. Don't expect it to be 0V or any other known voltage.

That gate also has a capacitance. Your body is a capacitance. Every time you touch that gate, you're connecting two capacitors and a charge balance will occur. This will alter the voltage on the gate. Ergo, you've created a simple transistor capacitor memory scheme not terribly different than DRAM. Pretty nifty huh?

I'm surprised a little that the brightness remains the same between power cycles, but maybe that's attributable to having a high quality mosfet with a high gate impedance?

Lastly, although this is a great lesson, don't design a circuit like this with a floating node expecting it to be a specific voltage.