This is how it works in Liga
But it is (almost)the same in Serie A as well. A few clubs earn a lot, lot of them earn little.
In Serie A, it is divided in this way:
40% is divided equally between the 20 teams.
30% is divided between the clubs based on population. 5% based on the population of the city in which the team is based and 25% based on their average home attendance
30% is awarded to teams based on performances. 5% depending on the last season, 15% on the last five years and 10% based on results from 1946 up to the sixth season before the current one.
So this just works to the benefit of Juve, Milan, Inter and (maybe) Roma and Napoli.