Avoids a messy firing: Comey's term doesn't expire until 2023, but Trump could fire him, with cause. Now he won't have to go through that process, even if it would scramble partisan lines, a Trump favorite.
And a bruising confirmation hearing: Democrats would surely use such a forum to litigate the FBI's investigation of Hillary Clinton's emails, in addition to how the agency handled allegations on Trump and Russia. With Comey staying, Trump can skip that process.
Finally, it gives some stability: The NYT reports that the FBI workforce is on edge after the past few months, for good reason. Now, at least, they'll have their boss in a stable position to guide the agency.