The problem with Barcelona is, that they just seem to lack any kind of self-assessment.
They always preach about "Mes que un club", while they've already sold their soul to Qatar and aren't any better than any other top club. In fact, I would say they're worse than most. On top of that, their front office guys prostitute themselves (sounds harsh, but you really have to call it that way) and let one single player and his clan run their club.
Love them or hate them, but that's where Real and Bayern do a much better job by simply being ruthless/pragmatic and not losing their pride. Ronaldo demands too much money? Here, you go, sold to Juventus. Ramos wants a better contract? You sign this one, or you're out. Alaba wants wages, that don't reflect his play? Negotiations stopped, you can start looking for a new club. Ribery and Robben are past there prime, but still want to continue playing? Look guys, you're too old - no contracts for you anymore, you're gone after the season.
Messi is more closely tied to his club than those mentioned above, yes, but we're talking about an absolutely ludicrous and insane contract here. Those others are also club legends and wanted (or want) contracts, that are at least somehow explainable.
Yet they all got denied by Real/Bayern, while Barca somehow bent over and really granted Messi a contract, where he earns more than five times (!) as much as those others would've earned.