It's crazy that Apple entered into a contract to either pay for buying the panels...or pay for not buying the panels.
Seems like it'd make a lot more sense to buy the panels either way, and just use them as needed. They'll be selling iPhone XS, XS Max, 11 Pro, etc. for years to come. Might as well spend the money on something tangible that you can eventually make your money back on.
It's not crazy at all if you take a look at the other side, Samsung. Samsung has to invest in building infrastructure in order to produce and meet the supply Apple demands. There is a sizable investment that Samsung has to make so they seek a guarantee from their partner, Apple, that Apple is going to place an order for a certain amount of displays.
If Samsung deems the risk of building the infrastructure too high then Samsung can simply say no and tell Apple they can only meet 60% of Apple's demand. Apple can then source displays from other manufacturers but what if other manufacturers cannot supply the other 40%? They have to go back to Samsung and strike out an agreement.
Obviously, I do not know how the negotiations went but now that you know that Samsung had to invest money to build out the infrastructure, you can see that there is another side to the story.
Apple could have negotiated with Samsung and told Samsung they weren't willing to offer a guarantee but Samsung is not a small player, they can be cunning and smart just like any other corporation.