I wouldn't be surprised if many of the motorsport software engineers you mention come from mechatronic/electronic/aero backgrounds. Don't get me wrong, I've seen an analog electronic engineer perform software wonders; 10,000+ lines of bash, custom C macro libraries, and a PHP runtime older than I am have taught me that programming can be closer to art than science. But relying on that cursed bundle of chaos felt deeply violating and unsafe lol.
Nowadays, I mentally place any engineer without production software experience into a 'research' box. Any resulting code may break the laws of physics, and should be tested as such ;).
Edit: It's also a minor crime to look down on automotive software engineering! The stakes of mass-manufacturing have forged some seriously awesome software. Top-of-mind for me is CAN support in Linux and safety-critical contributions going into ROS2.