It's technically legit. Here's one way they could do it. The movie studio makes no money on the movie. The studio sells the movie to the distribution company for a fixed amount. Then the distribution company made $300 million on it, but that's not part of the contract.
IvyMike wasn't asking how it was done, but why people still seem to get screwed by it. Why didn't Jackson's lawyers know better? Asking for something like a percentage of the box office sales, or similar should be standard practice.
That's an interesting opinion, but I doubt the studio considered Jackson essential to making the Lord of the Rings movies. They had the rights and financing, and both they and Jackson knew they could have found someone else to direct.
The easy way french actors do to "give the fingers" to Hollywood accounting is simple: a % given depending on the number of people going to see the movies in theaters.
That's why actors like "Omar Sy" ("Les intouchables") are now very rich.