"Justly"? This whole concern about "justice" misses how these contracts come to be in the first place.
In any entertainment business, the talent (actors, musicians, athletes) is the product. They're not behind the scenes making the product happen. They "are the product" in a very real sense, because their headshots are on every banner and ad, their names are on the fans' merch that they're buying, they're the names being discussed and signed and whatnot.
And in the entertainment business, like most sales roles, you eat what you kill. Meaning, your take is proportional to the marginal revenue you drive. If you're a movie star and your flick flops, you're probably not making much money - typically, you'd have an equity stake or at least a profits interest in the production. If it does well, so do you. But because you're in a position to affect how much people are paying to see it, you're typically compensated proportionally.
Neither of those are true for the proverbial teachers. The best teacher in the world is not driving more marginal revenue to the school district in which they teach, which is of course set by tax rates. Also, nobody is choosing to go to a school for a particular teacher, at least not in primary / secondary education. Now, that's not true for graduate programs, but that's a very different case, and prominent / famous university professors can in fact make bank. Maybe not Juan Soto money, but millions a year when including all sources of income. But your middle school social studies teacher? Marginal economic value is indistinguishable from zero, sadly. Best police officer in the country? Zero marginal economic returns, zero ability to claim a share of them.
Now, I'm glad I live in a world where the quality of teaching is not dependent on me being willing to pay the highest price for it, in some sort of auction manner. Not much more than 100 years ago, only the rich could afford good education, and today that's not true. But one of the prices of that change is that great teachers can't command their salaries, either. That will never happen in the entertainment business, but that's because of the fundamental nature of the industry, not for some character flaw in the populace at large.