The airline isn't being "punished" - they're being required to either complete a contract, or to compensate their counterparty for their failure to complete.
To take the example upthread, if the pizzaiolo drops a screw in my pizza, the resulting safety issue doesn't void the contract; he has to go off and make me a new pizza, or give my money back. It's not a punishment. If he can't complete on the contracts he makes, he has to stop selling pizzas or go broke.
I don't know any good reason why airlines shouldn't be subject to normal contract law.