Why do the N1 and N2 fans have different shafts? This question here contains a cutaway of a jet engine (which I'm putting right....here)



Credit: K. Aainsqatsi, Wikipedia

After reading the answer, and looking over the chart, I noticed that the shafts for the N1 and N2 fans are completely separate (something I'd never noticed before.)  

What purpose does that serve?  Do they always move freely from each other, or can they be locked?
Several reasons:

The fan, LPC/T, and HPC/T spools all operate at different speeds for optimal efficiency.  A hard link between them affects the speeds at which the other spools can operate, reducing efficiency.

Separate spools reduced the rotational inertia of each, reducing 'spool-up' lag, and allowing them quicker response times to throttle inputs.

The spools can be contra rotating, reducing the effective moment about the engine casing and mount, making the engine lighter.