Back years ago, the ATMs almost always used OS-2, an operating system that was very close to being hack free at the time. I suspect that today, many are using WinDoze which is probably one of the worst OS's that could be found.
Systems, programmers of today have been raised on this OS and select it because they are used to it. Linux is a far better choice and can be seriously customized to prevent hacking if the Systems Operators would take the time.