The majority of people fall into the first category, regardless of sex. There are a lot of people who with exposure might consider software development as a career, but didn't think of it as an option. For various historical reasons (exposure to programmable computers, video games, adults that can explain or teach programming, access in school, peers that program, role models, etc) the people that tend to realize programming is a career option and understand what that career might entail tend to be white and asian males. That isn't to say there aren't many white and asian males that also don't know programming is a career option.
Now that "tech" is so important and lucrative I'm sure this is changing to some extent, but this is a recent trend that's probably 5 years old at most. Tech wasn't viewed the same as it was now in 2012-2014 and felt like a much more risky and inaccessible field. Now it looks a lot more like any other high paying corporate job.
The Dot Net bubble in the 90s was arguably the biggest news story of the decade. Everyone knew there was tons of money to be had in tech, and stories of people landing jobs at startups after learning a little bit of HTML.
I'm aware of the dot com bubble. My point wasn't that people weren't making money, my point is tech looked risky and new, especially the web based companies that dominate now. Microsoft, IBM, Oracle etc were stable jobs but they were for engineers/nerds. There was money to be made back then of course but money isn't the only thing that makes jobs attractive. Social and cultural status and stability are important as well. A doctor is a safe, high paying, high status job. Tech is only just now starting to look that way to mainstream people.
Now that "tech" is so important and lucrative I'm sure this is changing to some extent, but this is a recent trend that's probably 5 years old at most. Tech wasn't viewed the same as it was now in 2012-2014 and felt like a much more risky and inaccessible field. Now it looks a lot more like any other high paying corporate job.