Kinda surprised a train would run windows 95 at all and not some sort of custom train specific OS.
As for why they would not use Linux? Leaving aside that these probably predate the wide adoption of Linux, Windows is often used in embedded devices which need graphical interfaces/displays. Again, ease of finding developers and third party tooling is a big driver.