The prosecution left and the judge was just delaying the inevitable. Flynn and Powell wanted a win; instead they got a forfeit.
It seems the President and his administration want to move on the information that Flynn cannot share under gag order rules until Flynn is cleared or pardoned. The DS wouldn’t clear the charges because no more gag order on what Flynn knows.
So, the President moved things along with a pardon.