It looks like it all changed once we hit the early personal computer era. Suddenly, you could learn on your own time, and many more men did than women.
Now companies realised they could skimp on training and get away with it.
Women then thought... "Hey going into a career where I am competing with men who have invested hundreds of hours before they turn 18 and where most learning is expected to happen in your own time is crazy"
Even today the narrative is learn on your own time if you want to be successful. If companies really give a damn about diversity then they will start incorporating learning on the job.
...oh wait instead they are pushing to get young girls to invest in IT just like some young boys do.
When I grew up in the 1980s, girls didn't have an interest in personal computers and video games. Didn't have an interest in Star Wars or Star Trek or other sci fi that the boys had. Over time men into those things taught their daughters how to use a personal computer and program and get into sci fi like Star Wars and Star Trek. Then once social networks came about and mobile devices more girls got into computers to use them at least.
But yes on the job training and learning is needed for diversity reasons. When women first got into computers and programming they got trained on the job. Started out punching cards, and later wrote programs with some training and on the job experience. That all changed when personal computers came out and then companies no longer hired women and trained them on the job or helped them learn at work. Boys learned in their own spare time by typing in programs from magazines and learning how to modify them during the personal computer era.
That's kind of the point, isn't it? By your own admission, hiring patterns might be based on factors other than representation, which then translates into decreased interest by under-represented groups.