I have a coworker who, when he got out of school in the 90s, got hired to write COBOL. There's a ton of COBOL out there, and why not? As much as "waterfall" is a fiction, high-spec, super-detailed-spec projects actually do have some advantages as they are usually well thought out. That is where COBOL played, and why those apps have run since the 70s.
Sometimes the entire specification really does exist before you start. Certain kinds of software applications have not had substantive new functionality in decades, so everyone knows what a complete implementation of it looks like.