I agree with you. We heard news that Xavi will not stay with Barcelona next season. But in the end we saw that Barcelona sacked Xavi. I don't understand why the Barcelona management took such a decision. Xavi was quite successful with Barcelona. Barcelona's squad is not strong enough, yet the team occupies the second place in the table.
Hansi Flick became the new coach of Barcelona. I don't think Hansi Flick is very experienced. However, he was quite successful with Bayern Munich. But Bayern Munich's squad was also very strong. But Barcelona's squad is not strong enough. At the same time, financially, Barcelona is now in crisis. So it is unlikely that Barcelona will dominate La Liga next season with the help of Hansi Flick.
I was also shocked when I saw that announcement. However, seeing how Xavi and Barcelona were having heated arguments on not been appreciating is what I suspected. He said it that he will not be staying and after some persuasion from people I have no idea about, he changed his mind and I don't know if that came with a condition or not and then Barcelona decide to dish him some heart break before he dish them and it's possible that a new manager was already agreed before the announcement.
I'm not too familiar with Hansi Flick but he has a good record with Bayern Munich as a coach, win Champions league, club world club and world cup and Bundesliga twice for Bayern Munich. That's a good profile to lead any team but since Xavi is a product of Barcelona, he would have done better as he he knows the club better than outside who never play there.