^Continuity.
Dench didn't take over as M until Brosnan's movies. If CR is supposed to be before those then M should be male as seen in the prior Bond movies.
Of course, continuity goes out the window here as CR would still be set in 2006.
Also, IIRC, Dench's version of M is partly a reference to Stella Rimington, the first real life female Director-General of MI5.
It was indeed a continuity error - in Goldeneye she accuses Bond of being a dinasaur and a favourite of her predecessor. That doesn't fly if she's the M who promoted him. She was also a bureaucrat and a 'a bean counter' whereas reboot M is pretty shrewd and ruthless.
Still my favourite M line goes to Judy, "If I want sarcasm... I'll call my children." So cool.
I'm happy for M to be a woman, I love Judy Dench, and I love the fact that she single-handedly turned M from a cameo to a principal character but even so, for continuity's sake I suppose a different actress should have played her.