In the early 90's, there were efforts by customers to get rid of their mainframes which put IBM on the ropes then, until Lou Gerstner took over as CEO and stabilized the business. It's not like these transaction workloads can be easily ported elsewhere since some of them go back as far as the early 1970's. Those customers able to ditch their mainframes did so a while back. The rest of these systems will remain due to risks and costs of migrating to a suitable alternative. It's not a huge revenue stream for IBM, but a very profitable one.
Note that SABRE is the OG enterprise app, by most measures it was the first non-military/govt/research computer system, going live in 1960 (!) and the core still runs System/360 (which they had to migrate to, not from!).