If I remember correctly, Sessions offered his resignation and Trump decided against it. Either way, Trump was stuck with Rosenweasel because McConnell wasn't going to schedule hearings for a replacement.
POTUS was under constant and public threat from the likes of McConnell, Graham, et al and leadership in the DOJ not to touch Sessions.
When you think about it, it’s pretty damn frightening.
I don’t know what made Sessions think he was irreplaceable. I do understand why he was to the coup plotters.