Cause of triode mode in MOSFET
The width of the conducting channel at any point is a function of the voltage between that point in the channel and the gate.

If Vds is zero, source and drain are at the same potential. So the potential at each point across the channel will also be the same (zero). The channel has constant width.

If Vds is (say) 1V, now there is a 1V potential distribution across the channel. Now the potential between gate and each point in the channel is not equal - it decreases as you get closer to the more positive end (drain). Let's say Vgs = 5V - that means that Vgd would be only 4V.

Hence the width of the conducting channel will decrease. This is what they are showing in the figure.