As lenses get larger apertures, particularly at shorter focal lengths, it becomes difficult to keep the edges sharp, eliminate field of curvature, etc. This means larger diameter glass and more elements.
Since the cost to grind glass increases with size, cost of large diameter lens elements skyrockets. Now, add several more expensive elements to try and correct distortions, CA, etc, and the price gets out of control.
For expensive lenses, the market is much smaller, so development and tooling charges are amortized over just a few lenses, maybe 1000 more or less. Spread that $1 million over 1000 lenses, and just the development cost is $10,000 per lens, and add another $10,000 manufacturing cost, and you have a lens that sells for $40,000, which is what the low volume cinema lenses sell for.
For a lens that sells 100,000 copies, the amortization might be $100 each, and the price is more reasonable.