Did Barcelona spend a fortune on him? Yes, but as you said... he's not doing anything for Barcelona that would justify keeping him in the team.
On the other hand, he hires João Félix, who seems to me to be very close to fulfilling one of his dreams, taking the place of Ousmane Dembélé in the Barcelona team if Dembélé actually makes his transfer to PSG.
In the worst case, they should at least complete the loan of João Félix until the end of the season, and open up the possibility of exercising the option to buy the player's pass in the future.
I hope Xavi comes to terms with this, I don't understand why he wants to hold on to Dembléle so badly.
This could be part of Barcelona strategy to recruit Jao Felix or Bernardo Silva. By releasing Dembele, it will provide additional funds to recruit one of these players.