Two words: “Hollywood accounting”.
If a movie is a smash hit at the box office, the studios can and will nickel-and-dime every expense that they can against its revenue to turn it from something that would be considered profitable in most any other field to a loss on the ledgers; if it’s truly a bust and never even recoups its budget (including its marketing), it likewise gets marked as a loss on the ledgers.
In the end, it’s all about the tax write-offs for those losses (either real or manufactured); a recent example is David Zaslav’s taking a chainsaw to WBD’s divisions, such as Cartoon Network and Warner Bros. (such as shitcanning a late-in-production *Batgirl*, because Zaslav would rather take a tax loss on it than complete it, have it not make its money back at the box office, and end up on Max).
Latest Answers