A common statistic I see quoted about COBOL is that there are “more than 200 billion lines of COBOL in existence with an extimated 5 billion of new code [written] annually”. This statistic comes from a 1997 study by the Gartner Group. Archive Link Here
A more recent study by Vanson Bourne (commissioned by Micro Focus) in Feburary 2022 estimated that there are actually around 775-850 billion lines of COBOL in daily use. Archive Link Here
Ancient software has been built on layers of undocumented requirements. Even if you could magically find the capacity and budget to refactor it all, you will encounter inconsistent behaviour.
You don’t want to be the guy that migrates missile silo software to run on docker.
You will confront business stakeholders with inconsistencies and false assumptions. Ancient software often works like modern ML where the results could be accurate but the method is mysterious. No one wants that.
What people want is for the damn thing to keep on running. That will become increasingly more difficult once the fortran and cobol crowd head into retirement.
Young folks: if you want to be dangerous later, learn how to wrestle with ancient code. Learn refactoring and legacy languages like fortran and cobol. Learn their build systems and hardware. Learn how to interface them with with the 21st century. Because the government is not going to move to nodeJS and Citibank will not adopt dotnet 8 any time soon.