The change in James Bond's iconic M character was made for the most recent film, Spectre. The character, played by Ralph Fiennes, is now the Head of Joint Security Services, combining MI6 with MI5. This reflects the real-life changes that have happened within British intelligence agencies in recent years.
The new M is a more serious and somber character than previous incarnations. In Spectre, he has to deal with the fallout from previous films' events, as well as the return of villain Blofeld. He is a more complex figure than before, and this is reflected in his interactions with Bond.
Overall, the change to M was made to reflect the changing times within British intelligence agencies. The new M is a more realistic and complex character that better fits the current landscape of espionage.