Cobol is still there not because of cobol itself, but because of vendor and platform lock-in. And I guess having monolithic codebase/platform.
it’s not even esoteric and difficult, just a lot of it without much structure visible to you.
COBOL is still running where it’s running because those old applications 1) work and 2) are very expensive to rewrite. Unimportant programs were abandoned. Simple one were migrated to Java decades ago. The useful-and-complicated — and often badly designed — are what remain.
If you’re a bank, you run COBOL. Estimates are 95% of ATM transactions go through a COBOL program.
But it doesn’t have to run on a mainframe! We’re adding COBOL to the GNU Compiler Collection. www.cobolworx.com.
This is what people miss about COBOL. It's not like people are compiling COBOL and running it on Linux on an x86 box. They are running it on legacy operating systems (and hardware) which provide a different set of underlying services. It's a whole different planet.