In La Liga, the rule is that you can't spend over 70% of your revenue on wages. Barcelona, paying all of their players', including Messi's, wages were at 110% of their income. Even without Messi's wage, i.e. if he had agreed to play for free, they would have been at 95%. As he would have been a 'new' signing, given his rolling one year contracts with the club, they wouldn't have been able to re-register him. Plus, in any case, apparently under Spanish employment law he couldn't have taken more than a 50% pay cut in one go. So he quite literally could not have played for them even if he had wanted to do so, either for a salary or for free. The club's an absolute shambles.
This idea that 'he should play for free if he really loves the club' is very strange to me. Why should he? He's literally the finest footballer ever to grace planet earth - why should he simply offer his services for nothing? There's an odd targeting of Barcelona's players more widely in response to this whole debacle in which the club finds itself (Umtiti, for example, got booed in their last friendly apparently, for refusing to take a paycut or leave the club), rather than the fatcats who have put the club in this position. Why should the players have to sacrifice money that is legally theirs because the men signing the cheques got carried away every summer?