As I said upthred, it wasn't abou protectng M, it was aout protecting everyone else.Number of innocent civilians killed by Slva after Bond kidnaps M? Zero.
Though that would also have been the result if they'd stashed M elsewhere and left the "trail of breadcrumbs" to Skyfall where Bond was waiting.
However, I thought there was a definite subtext - and referenced in dialogue - that M goes with him because it's one last field mission with a chance of killing the guy who'd just fucked up her career, and a chance of getting killed- which would be preferable to her than the enforced retirement she faced otherwise. She went willingly, with her eyes open - she was taking the Long Walk, as it were.