The main goal is actually to make money using Messi
Both barca and La liga wants to make money and bring more audience to La liga
So, having Messi in final few years of his career is best - people will come and see Barca matches just to see Messi playing one last time.
Messi on other hand wants to play atleast one year at top club - until copa America next year.
And, based on his form, I think for 45-60 mins, messi can still do a lot for Barca.
So win win situation for everyone - Barca, La liga, Messi, and fans