Reminds me of my last programming job.
I was working on a commercial printing company. It did a lot of products for the banking industry. The print machines were pretty old, and made by Xerox. So old, in fact, that most of the wiring/sensors were one-off replacements done by the technician in charge.
It was (still is) a mess. A computer running Windows 98 (this on 2011) talked to a Linux box. The Linux box then sent the job to the board on the machine. It was all done in Java, except the low level stuff that ran C.
The machines broke constantly, and they required some Oracle certified dev to come down and "fix it" (which cost thousands of dollars).
One day, I asked my boss "Why don't they just buy new machines? It costs more to keep these running than to buy a new ones."
His answer opened up my eyes to the corporate/bureocratric culture of mediocrity:
"This works."
And to to top it all off, the production manager wanted me to write him a "little" program for the Windows 98 machine. The program would be used to keep track of prodcution for the whole department.
Unbelievable.