Microsoft decided to skip Windows 9 because, after doing a lot of research, they found that a lot of commonly used legacy software had implemented compatibility hacks which involved checking for "Windows 9" to detect when the software was running under either Windows 95 or Windows 98.
Instead of breaking a lot of software or requiring a lot of updates (some of which could even be from vendors who were no longer in business) they decided to work around the problem by just skipping straight to 10.
Edit: My mistake, I responded to the wrong comment. But I'm gonna leave it here because I already typed it.
This is somewhat analogous to the way midterm elections are treated in the US, and a decent comparison would be when Mitch McConnell blocked Obama from appointing a Supreme Court Justice towards the end of his second term.
The Democrats lost seats in Congress during that midterm season, which the Republicans used to claim that the American people had no faith in the Democrats and therefore no faith in Obama. They then used this claim as an excuse to block the Democrats ability to govern.
In this case, the people of France have voted for another party to represent their interests internationally to the EU parliament.
Macron will now face claims within the French government that the people voting against them in the EU elections indicates that they have no faith in his party's leadership and that will make it difficult for him to govern.
With this move, calling an election early, they will have a clear indication of who the French people wish to lead them internally and, if they reelect Macron's party, can dismiss the claims from opposition parties that the people don't trust them.
It's worth mentioning that many governments around the world don't have fixed election cycles the way you do in the US. Instead many countries have an end date by which the election must occur, but a new election can be called at any time before that date if the government thinks it's necessary. A similar thing is currently happening in the UK where the Conservative Party has called an election for early July, even though the election didn't have to take place until late January 2025.