Not coincidence - he's only running BECAUSE the presidency is now his only avenue of avoiding legal accountability for his crimes.
That said, your confusion seems to be rooted in the math - the crimes in this particular case all happened between October of 2016 and the middle of 2018, roughly 6-8 years ago.
Prosecutors didn't learn of the crimes until 2018 when his co-conspirator was tried and convicted, but by that time he was protected by the power of his office and would continue to be until January of 2021.
So assuming the investigation started in early 2021, an April 2023 indictment wasn't at all out of the ordinary - so why is the trial happening now? Again, because he and his attorneys caused several delays all to present the same denial defense they've been touting since the indictment a year ago.