I know that in a well known insurance company I used to do sys admin for, the main pricing system used is a 25ish year old mainframe called GenZ. Since the mid nineties, I think, a new system has been in development and is currently being rolled out in beta
The mainframe, probably, worked perfectly well in the 1980s - but since the company grew, more data was added and the system needed to hold more. Patches were applied, more problems happened, and its been like that for years.
Currently, the system interfaces with at least 200 other applications used by said insurance company, and so replacing it will be a very hard job, and is probably why it has been put off for so long.
Now that the new system (called Maxx) is being rolled out, several hundred applications will have to be phased out.
Poor coding isn't about developers being afraid to do things that aren't required, its just that mostly, they don't think far enough ahead, think of the worst scenarios, or think of what it may be like for consumers, employees and developers in the future.