Bartomeu knows that he is hated and regarded as the worst president in Barcelona history. However, he did not also want to go down as the president who let Messi go.
As he had nothing to lose, he took on a firm non-negotiating stance. i.e. If Messi left, they would go to court.
No club was willing to take on the risk of having to pay hundreds millions of euros compensation 4 years down the line, in case the court case was lost. It was simply not worth it just to have Messi for one year (he will be free at the end of next year).
Bartomeu won this battle and Messi lost. Hopefully Barcelona also comes out a winner.
I do not expect Bartomeu to resign, unless the Catalan police accusations are serious. In which case, he would have no choice.