This measure is quite unpopular and might result in him getting voted out of power.
So what’s the Realpolitik reason for Macron to do this now? Does he or his allies gain something from such a drastic move?
Two no-confidence votes on this Monday failed and Macron was not voted out of power. As president he also cannot easily be voted out of power, his government might have, but didn't. Also Macron cannot be re-elected as president next time anyway.
As it is, the pension age will be lifted by two years. The pension system in France works as in many other countries by a transfer between generations, i.e. the younger, working generation pays for the older, not working anymore generation. A lift in pension age therefore trivially means that there would be more people paying for fewer people receiving the payments, i.e. a relief for the young, working generation and an additional burden for the older soon to be retired generation.
Obviously Macron wanted to gain favors in the younger (and maybe more rich/tax paying) French population. If this really plays out and he gets more popular in that segment, remains to be seen. He himself said that the choice was between “decreasing pensions, raising taxes or letting our children and grandchildren carry the financial burden.” (Source)
Macron also campaigned on changes to the pension system in the past and with this measure made good on some of his promises. It wasn't a surprise move then.
Also, the French left may not be that strong anymore than it used to be in the past. For example, Jean-Luc Melenchon, the Left's presidential candidate, only came in fourth last presidential election.