This is a much bigger problem than just the software industry in the US. I'm a Navy veteran, as a nuclear reactor plant mechanic. I remember being shocked in MEPS (the enlistment and entry processing center for all branches of the armed forces) by the number of black men enlisting in the Army and Marine infantry - it's much higher than the local population would suggest. But of the roughly thousand or so people I worked with as Nukes in the Navy, I can recall only one black man. The trend is just as strong in college. While I'm working as a software engineer today, my degree isn't in CS: its in Mechanical Engineering. The same trend applies there, too. I've worked with a grand total of one black engineer professionally, and he was an intern! There is a serious problem in this country with our failure to attract black and latino talent to engineering. Its pretty frustrating to see all the media attention focused on bringing women into CS, while almost zero attention is being focused on the lack of black and latino engineers.
I can't point to any single factor that is driving this trend. But it must happen in High School or earlier, since it's already totally broken by the time folks are graduating HS.
Computer science isn't much different. All the math coursework hazing is why I have a history degree and a minor in CS - the minor let you take all the interesting stuff, without the 4-5 semesters of poorly taught, mostly useless math department coursework.
I started as a EE. My diff EQ professor literally did the stunt "look to your left, look to your right, of the three of you, only one will pass my class." I was the only caucasian to pass, but I made a D, and rather than re-take the class I decided that EE wasn't for me.
There was only one way to ace that class, and that's to live inside it. I have a very good mind for math, but I was also interested in lots of other things: music, theater, philosophy, humanities, business, politics. The same semester I had made a D in Diff EQ I had also taken a Phil 101 (Logic) class which I aced. I was also a walk-on in a play that semester.
The dean of the engineering school called me to his office to tell me I wasn't the sort of student the EE program was looking for. I left and got an MIS degree, where I could develop as a much more rounded student.
Looking back some 30 years later, I realize now that the dean was literally telling me that they don't want well-rounded EE students. He was literally telling me, in spite of being in the top 1/3 of my class (math-wise) the very fact that I wasn't willing to forgo Logic and my theater activities to become a better calculus student made me a misfit. The whole point of making Diff EQ so amazingly difficult was specifically to weed out those who did anything but study Diff EQ.
So in the end, I made the right decision for myself and my career. And I've learned a healthy suspicion of companies that tend to exclusively hire ace engineering students.
But even though I breezed through it in high school, my classmates didn't, even the AP courses. So I'm not sure how much that could be ramped up. I do think at least discrete math could be taught earlier, though.
Why?
I think equal opportunity is a better goal than equal representation. Forced equal representation can quickly deteriorate to racism/sexism.
Inequality in the name of equality.
So for creating any sense of equality in society it's a fact that there needs to be more or less equal representation. Yes there is IQ disparity which probably decreases chances further of finding elite employment. But there are outliers in every population, enough to create equal representation.
Life is inherently unfair. There will always be differences in power. The goal can't be to assign equal power to everyone because it is impossible. The best goal is to ensure that there isn't a huge difference in power. Equal opportunity provides that guarantee.
That was not a passive activity. So is it any real surprise that it might have long-lasting effects that need active, rather than passive, countering?
EDIT: your comment reads differently after your addition of the second paragraph so now I don't know if I'm disagreeing with you or answering a rhetorical question or what. Regardless...
Government sponsored education for the unprivileged is much better than the ham fisted bandaid of making companies match percentages of different segments.
[0] https://www.washingtonpost.com/news/wonk/wp/2015/08/12/black...
The groups that suffer the most from "equal representation" are immigrants and their children. These people tend to be high achievers, competing in the upper echelon where every little difference counts. It is unfair to punish these people for actions that were done when they were not even in the country.
Even if there is some way to only target the children of the perpetrators, it isn't fair to punish people for simply being related to the perpetrators.
What happened in the past is wrong and unfair, but reparations will just displace the hurt from one group to another.