The mainframe exists because IBM and the devs respect the time and investments made by its customers.
There are efforts made to make sure code doesn't break and migrations are put in place.
Sadly only Microsoft and a few others share this attitude, and its likely why these companies and their products will be around forever.