There’s a couple of reasons.
Firstly, the high pressure compressor and turbine perform better at higher rpm than the low pressure compressor and turbine so allowing them to run independently closer to their optimal rpm is good for efficiency. It’s still not perfect because the compressors want to turn slower than the turbines but you’ll need a gearbox to make that happen.
Secondly, inertia. Jet engines are started by getting the high pressure spool up to speed first, usually by feeding high pressure air into it from an external source like the apu. By putting the high pressure components (which are smaller and have less inertia) on their own spool, the engine becomes much easier to start because you don’t have to put energy into rotating the bigger low pressure components.
Latest Answers