France has prescription periods whose length depend on what the stakes are. But as you point out in your question the investigation started aeons ago. It began while he was still president if memory serves - well within the prescription period.
Criteria for the prescription period is based on the time elapsed between when an event occurred and when a judge seizes it, rather than the time elapsed between when an event occurred and when it arrives or gets judged in court.
As this case has been seized ages ago now, and long before the prescription occurred, it's fair game for the judges in charge of the investigation (France has an inquisitorial legal system) to dig as deep as they want for as long as they want.
There's precedent on this in France, too. Specifically, Chirac was eventually condemned [French] over a case that had been pursuing him from back when he was the mayor of Paris. The case was put on hold for the entire duration of his presidency after it was deemed that such petty matters shouldn't get in the way of his presidency. It was resumed the minute he no longer was in office - think bloodthirsty hounds awaiting their pound of meat.
The contrast with other democracies, such as the US, where they had no qualms with trying to impeach Clinton when it became clear he lied about having an affair with Lewinsky, is of course worth noting in passing. Such a thing would never have happened in France because it would be deemed petty.
(Almost amusingly, Trump's lawyers recently tried to get rid of his sexual harassment charges with a similar argument irrespective of an unanimous SCOTUS ruling in Clinton vs Jones (and citing the latter, no less), which a) set a precedent that no, POTUS isn't above the law, b) incidentally set the Lewinsky affair in full motion, and c) was commented on by no less than Trump himself.)