Same thing - in politics, as with many other areas, you are offered the opportunity to resign rather than being sacked. Which allows the PM to express his regrets and makes it easier to be reappointed to another post in the future.
However if it was intended to preempt the letter and prevent or limit any damage it obviously hasn’t succeeded.