Sure, but what prospects will those newly minted COBOL developers have when the next recession hits and their department decides most of them aren't that critical after all or when they realize they're in a dead-end job and want to move on? The market for mainframe programmers is small and getting smaller every day. There are no new customers in that market, only the existing ones and the list keeps getting shorter every year. The situation is even worse for anyone stuck on legacy tech from the PC era on.
The department cannot get rid of mission critical maintenance. If you do that, your company dies right there and then once you're even minimally unlucky.
The newcomers have a delay where they need to be trained, which is typically measured at at least a year.
The new guys get removed first. Ones working on shiny less critical processes. Shiny and critical generally happens in startups.
When legacy is being replaced, old timers generally see the writing on the wall and move on as well as retrain.
Agreed. I liken it to the natural world where a species can be extremely specialized to exploit a particular ecological niche, but that niche is getting destroyed. Times are good when you're the only animal that can get to a particular fruit but when that fruit goes extinct, you're screwed.