~~~
Barcelona current bad streak is one of the most painful insults for Xavi because currently bad finances have caused Xavi reputation to decline, while Xavi has been trying to provide the best strategy since the start of the season and is currently experiencing bad times when players are injured and there is a lack of quality reserve players.
Xavi current thinking is that it would be better if he left Barcelona rather than risking his reputation becoming bad.
There was no better choice for him than to just resign. Xavi is influenced by the media and he expressed this shortly after losing to Villareal. There was pressure from outside that made him uncomfortable staying at Barcelona, perhaps he had been treated badly all this time. In my opinion, Xavi is a great potential coach if he is supported by good finances, but unfortunately he didn't come at the right time.
Right now Xavi will only focus on the remainder of the season, including fighting in the Champions League. Barcelona has lost a lot of hope in La Liga, they also failed in the Copa Del Rey and the Spanish Super Cup, so he was tired of all this.