I quickly worked at a company like that, that had large parts of their core business logic running on an AS400, and they were asking what they need to do to migrate to something newer - was surreal. A few hundred employees all interacting with the system - in building A, a deliver arrives, they scan it like this, press this button. Building B, a guys job was to oversee the conversion of tables from As400 to a csv format suitable for some other outsourced software. Data goes into system C and shows to employees working on conveyor belts this and that. Hundreds of kilometers away, truck drivers get a notification for this and that.b
And, nobody knew how the whole worked. Everyone has their niche of interaction with the system. They would be able to shave off an insane percentage off expenses (in the form of employees whose job exists for no real reason), but the switching costs would also be immense.
I sometimes wonder what came of their company. The system was so far beyond the complexity that anyone could grasp, they had no inhouse devs, they'd need people with the competency to judge which competency they need.