I think the main reason was the bad relationship between Laporta and Xavi otherwise he could stay for the next season.
Even Flick was not successful recently and they could have much better coaches instead of him
Xavi was expected to be kicked from Barcelona at any moment especially that few weeks ago he was declared out then resumed... Their might be some misunderstanding and tensions between him and the staff but that was mainly due to the poor results they had and for not winning anything this season.