Derailleur cage length relates to "capacity", or the derailleur's ability to handle excess chain links (the chain that would otherwise droop when you're shifter to a smaller chainring / cog range).
If you're running a single or double chainring setup, a medium "GS" cage length is a no brainer.
The long cage length ("SGS") provides enough capacity to take up the slack of a typical triple-ring, 27-speed setup.
However, you can run a medium cage length on a 27-speed setup (in most instances) with a restriction: You can't shift to the small/small gear combo without losing chain tension and dropping your chain. That's normally OK, since small/small is an "illegal" cross-chain combo that normally isn't used. However, if you accidentally shift there, the cage will fold back on itself, lose tension, and the chain will quickly derail.
If you don't want to bother with this, go with a long cage setup.
If you want the reduced chain slap, increased chain authority, cripser shifts and greater obstruction & spoke clearance and are ok with the occasional dropped chain if you goof, a medium cage derailleur is a good choice.