The tax treatment of some types of film company/partnership is horrendously complicated. And yes, they do often - particularly in America - use very questionable accounting methods which can render hugely successful films financial failures. One of the classic examples if Forrest Gump, which was a huge success but which on paper made no money. The writer of the book - Winston Groom - got shafted because he was supposed to get a share of the net profits, not gross. They had the balls to approach him for the rights to the second book that he wrote, and he told them to do one on the grounds that he didn't want to be involved in another huge failure.
I think the technical term is "hollywood accounting", where the studio effectively charges every production for every cost of every other production that year (or released, in pre production that year), then off set it against the profits of the one film...
IIRC an example i've heard is where they might take out a full page advert for 2-4 films (on the same page), but bill each film as if it had the full page to itself, and do that for pretty much all the marketing stuff (hence part of the reason the marketing budget for many films can be a very big percentage of the total cost)...
I think under the "hollywood" method the Star Wars films have yet to break even, as IIRC one of the actors is still getting the yearly "we don't owe you any additional fees as the film is not yet in profit" statements (I think those who did not opt for the percentage of the gross are getting that).
The Forest Gump story doesn't surprise me at all, iirc that sort of thing is fairly common for authors who have a book optioned but are not familiar with the system, and is fortunately becoming less common now as I think the various authors associations are getting quite good at giving advice to new authors about the scams (both legal and illegal).
It's a system that is about as corrupt and unfair to the "smaller" people as is possible to be, yet is somehow still legal.
Fortunately most businesses don't use quite those smoke and mirrors, even the film and TV industry base din the UK, where I think the accounts have to be a little clearer....
IIRC in the UK it's not uncommon for a TV series or production company to make losses partly because of the tax breaks they can get (Uwe Boll by all accounts never wants to have a success as he makes a relative fortune from the German Tax payer for his abominations), and TV/Film can pay for itself over decades, which is one of the reasons ITV were in such a poor state for a while, they'd opted for the short term profits from reality TV, as opposed to anything with any value after the initial showing/first week.