Yeah I have also seen the news and I'm surprised about the result.

Because Xavi was looking very determined to leave. Like you said the chairman was doing everything he could to convince him to stay but first Xavi didn't seem likely to be convinced. Maybe Xavi wanted to give it another shot after starting to get positive results for quite long.
I don't think he is a bad manager at all. He couldn't maintain the success in the La Liga which I criticized him for before but this improvement might be a good sign for the future. Maybe one can say that they are eliminated in the Champions League as well. But I would like to underline an important thing there, it was due to the red card otherwise I believe Barcelona would reach the semi finals.
Unexpectedly... I read yesterday that after another meeting between Xavi and Joan Laporte, his decision remained unchanged and he will leave Barcelona at the end of the season. But today I see that there was a second meeting in the house of the club president, and this allowed Xavi to change his decision. Look first, Alonso stayed in Bayer, now Xavi remains in Barcelona, all that remains is for Klopp to stay in Liverpool and everything will be as before...))