It's pretty customary to let someone resign rather than fire in government (or any senior leadership role, really). Even if we suppose that the reason he was asked to resign was because of a very real improper action on Sessions' part (i.e. Sessions acted in an inappropriate way for the role and Trump had some legitimate reason to fire him for cause), Sessions is still a valuable employee for a good many private sector corporations and may even return to run for his own senate seat on the next cycle it's available. Being fired can hurt these prospects when he applies or may leave his next employer with no legitimate way to spin the candidate as a capable employee, because his last boss fired him. Resignation can be spun... yes, most people will read the phrase "was asked to resign today" is read as "he was fired", but on any job application, this is asked in a form of "What was the reason for leaving your last job." If the job seeker writes "I resigned" it implies that the problem was not his fault but his boss's numerous and often well known questionable management style quirks.
Additionally, certain benefits come with resignation that do not come from firing someone. For example, in some employment situations, certain benefits are given in your severance package depending on the question of who initiated the employee leaving (see the Office Episode where one of the guys from the Merger was about to quit, only for Michael to do the "You can't quit, 'cause you're fired" line... and then realized he screwed the pooch.).
Finally, remember what happened when Trump fired Comey, who had managed to piss off just about everyone in Washington in the past year or so. Comey immediately started to go rogue and drop claims against Trump that he was not doing when he was gainfully employed. If we revisit the possibility that Sessions may have actually done something wrong, Trump could offer to let him resign to gain a possible... um... insurance (blackmail being such an ugly word and all that...) that Sessions doesn't start talking about his former boss on all the news cameras he can get pointed at him. Trump won't talk about the reasons for his request, and Sessions won't talk about his lousy boss.
And this isn't the only way to do this. Almost any time a major separation happens in creative industries (the boy band breaks up, the director leaves the film project, or an actor walks off set) expect one of the two participants to cite vague "Creative Differences" as the cause of the separation... it's best to read as they had a big fight over something (It could even be creative) and one of them was fired (though in music acts, it tends to be the band are too mad to perform... studios fire the directors or actors because of legit purposes but don't want the likely film to be called into doubt as being good by the movie watching public.).