There is a bar I go to play trivia sometimes and when it reboots you can see that it's running Windows 98.
Also, the local cable provider here has a channel 2 that is local ads being displayed via powerpoint and playing a radio station. When it unexpectedly reboots channel 2 shows either a Windows 98 or a Windows ME desktop.
I got my oil changed the other day and that company was still using XP. I got paint the other day also and the computer that was controlling the paint mixer was running XP.
Cost is probably a factor but I also assume that in some cases vendor support can come into play (or lack of vendor support, say if the vendor no longer exists). I also assume that some people have a "if it's not broken don't fix it" mentality and some of this hardware just keeps chugging along for them (I mean, until it doesn't).