What those two have in common are shitty working conditions. Yes, coding is done sitting in climate controlled offices. But it is mostly shit: shit doc, shit managers, shit clients, shit hours, shit tools. Only dumbfucks who don't mind shit conditions for more money would do it.
I'm sure if you checked the gender balance in government coding jobs and in gamedev you'd discover how it is more about working conditions than sexism.