As a device builder creating those machines (well, industrial CNCs, but similar idea) I don't have many options when trying to build something with a useful life of 20+ years. I just received an order for another machine in a lineup that started with some using Heidenhain controls from the early 90s, we ripped out those controllers and replaced them with models running a custom black box RTOS based on Motorola DSP 56002 chips on ISA cards that were on Windows 98 and Windows XP motherboards, then that company got aquihired and they stopped making those cards, there was a brief foray into PowerPC and now we're installing Arm processors running surprisingly modern Linux 4.9 with preempt_rt. We're talking to these motion controllers using VB6 running on a bunch of Windows 7 PCs with a few compatibility hacks enabled, and I'm installing new fanless PCs with Windows 10 LTSC 21H2, which claims support until 2032-01-13. If it's not running those relatively public, well-documented systems, it's likely a PLC or robot containing a proprietary ASIC running some WindRiver RTOS, and completely subject to the whims and survivability of that product line.
I love my customer's maintenance department, they're unusually thorough and attentive to preventative maintenance, greasing and oiling and replacing wear items, root-causing failures and keeping the machines in good working order for decades. But when you keep fixing each individual small part that breaks, eventually the market moves on and you have to throw all the replaceable parts away and start over. The process requirements haven't changed, the weldments and castings aren't broken, it's just that you can't replace a failed servo drive or Core 2 motherboard or ISA card because the supply chain gave up on them 10 years ago. There's no great advantage of Windows 10 LTSC and a 64-bit Arm controller over Windows 98 with 56002 ISA cards except that I can buy the former today and I can't buy the latter because no one makes them anymore.
There is no control OS or hardware supply chain that lasts as long as military, industrial, or scientific equipment can be made to last. Fanuc and others try with massive vertical integration and a "never deprecate anything" mantra, but they don't run their own semiconductor fabs to guarantee production of chips for stuff that doesn't keep up with the rat race.
Yes, I'll keep supporting my company's gear for as long as possible, but sometimes the answer is that I need to throw away 4 working servomotors, drives, a controller, and a PC, and invest 600 engineering hours into making this machine do the exact same thing it did last week, because that 5th drive blew the IGBT and took out the controller and no one can get a replacement. Customers don't like to issue $100k invoices when a $1k subcomponent dies...because that $1k quote was from 2008, and it's now literally priceless.