Banks for a long time thought the same. Then banking startups with code written on a clean slate in modern architectures emerged and are eating the bank's lunches as their infrastructure (more often than not a mix of mainframe, weird custom middleware and half-modern webstacks) cannot keep up in development pace. For example, in Germany Commerzbank (once a powerhouse) got kicked out of the DAX with former fintech startup now giant Wirecard replacing them.
Airlines are only "kept safe" from modernization because the cost of entry is so unbelievably huge - to start a bank one needs only a couple of employees plus a couple million euros founding money, but to start an airline one needs vastly bigger sums.
I think that's one of the keys to their success. Large banks can't just say, "well, we're not going to be supporting A, B and C so we can do a total rewrite."
It's a risk aversion issue. Large software projects are horrendously difficult to get right, and managing airlines is a horrifically complicated kind of project. Fault tolerance aside, just correctly modeling the problem is a mess and by the time you have a correct solution, the problem itself may well have changed. So you end up having to throw a lot of resources at a very complex problem and know that you may entirely fail at it, which is not the kind of gamble execs love.