Well since the film makers could not have likely gained the exposure or gotten it into as many theaters as the distributors, they probably came out better than had they tried to do it themselves.
Maybe they should have written a better contract.
What if the movie only made 500K, should the film makers give some of the money back?
The distributors took the major risk and they got the big reward, though remember what a film grosses is not what the distributors get, that includes, I believe, what is paid in total. The movie theaters keep a lot to pay for their overhead.
Let’s say that a movie on average costs 6.50. That would mean that approximately 21,538,461 tickets were sold. Now I do not know how much a theater keeps and how much they have to pay the distributor, but lets say it is only $1 - $2 per ticket, that give us at most $40 million in rev brought in to the distributors.
Since you also mentioned Bill Gates and DOS. Yes, Bill bought it from some guy. Yes, Bill made millions off of a small investment. But the guy was not doing anything with it. He would have never made millions off of it himself. Bill took the risk and it paid off.
Let’s say you had an opportunity to purchase something at a fairly low price and you felt it could make millions, would you find it in your heart to write a contract with the producer that not only would you give them the initial amount, but would pay them royalties depending on how the product did? If they wanted such a contract maybe, but if they said they would sell it outright, would you insist on giving them royalties. You after all took the risk, and you did the marketing and sold the product. If the seller agrees to the deal, then it is a win-win situation.