You might have a causality problem here. For example, my daughter, who is definitely at the girly girl end of the spectrum sees no problem with being a lawyer or a medical doctor. That probably wouldn't have been the case a generation or so ago (at least here in the UK).
> All of this is just demeaning the profession
As the father of said girl, and being acquainted with a lot of her peers, I can reliably say that if our profession became more attractive to them it would not be demeaning the profession in any way whatsoever.
Education (at home, early, primary, secondary, higher?), in the workplace (companies are biased against women?), or somewhere else (conferences, meetups, trainings, etc.)?
It seems that lack of "acceptance" is thrown around to explain this phenomenon, but it's not clear what and where should be improved to change this.
Look at how many people in a discussion like this on HN will simply dismiss low representation as "they must just not be interested" or "why should we care about having equal representation?"
Want more?
How about the cultural expectation that little boys will be more interested in computers than little girls. The stereotypes that suggest that all hackers are male or that girls who are interested in computers in middle or high school will be pariahs among other girls and not welcomed by the boys who are interested in computers.
Or the same stereotypes creating the unconscious biases that result in the teacher being more likely to suggest the Asian boy take the math and CS classes while discouraging the black girl, because Bob just seems more math oriented and she thinks Alice will thrive better in social studies. Those same unconscious biases 5 years later resulting in the man's better fitting the hiring manager's expectation of what a good software developer "is like".
The "booth babes" at conferences and the dudes in communities like this who refuse to acknowledge that that's problematic. The guys who assume that a woman at a tech conference is there as a recruiter or someone's girlfriend. The groping at the conference parties, and the defense of men who make crude sexual jokes about women in what should be a professional setting. The utter lack of women on conference panels on any topic other than diversity in tech.
I haven't seen this in a year or two, but suggestions that tech culture change at all to be less sophomoric and more professional used to result in general outrage that boiled down to "you're impinging on my freedom of speech at work" or "they should just grow thicker skin" or "I was bullied in high school, so I should be able to bully other people now"
The vehement dismissal in technical communities (even more so than in non-technical communities) of women's claims of being harassed or intimidated by men. The foul online cultures that result in women being intimidated, harassed, threatened with rape and murder (after being doxxed so that their addresses are public) for the high crime and misdemeanor of breaking up with a dude and then giving a game a harsh review -- followed by the majority (or at least the highly vocal minority) of the community blaming the woman for the whole thing.
A lot of these things stopped happening in the legal profession, at least, because they began to be perceived as legal liabilities. The medical profession opened to women in part because it could be pitched as a caring profession, which made it acceptably feminine.
The freewheeling culture of startups and large but young tech firms results in an environment where "professionalism" is less valued. That has some positive outcomes (hey, we can wear blue jeans to work!) but also some negative ones (a culture that's more personal, clubby, and clique-y, and where there's less pressure to observe boundaries). This summer, we saw some of the fallout from that, and the entertainment industry is currently reaping the harvest of 100 years of a culture without such boundaries.
What do we do about it? A lot of things.
We try to be more conscious of the expectations we set for our kids, male and female, based on their gender. We find and promote more female role models in the industry, and make our children aware of them.
We create, adhere to, and enforce -- and stop protesting the existence of -- codes of conduct for industry events and for employees (and managers/founders). We hold our peers to a standard of professionalism. We provide our employees with training (as most large law firms do annually) on the topics of bias and harassment, and we educate ourselves and them on our legal obligations in those areas.
We take women seriously and have empathy for them when they point out ways in which they're treated unfairly, and we don't knee-jerk defend the behavior of the men accused. We treat the claims of harassment and of innocence with equal skepticism.
And we do not ever accept malicious doxxing or threats of violence; instead of defending, we ostracize anyone who resorts to such tactics to intimidate women who attempt to participate in computing-centric professions, industries, and communities.
That would be a start.
Where I thought I would be weird for choosing electrotechnics as a profession (and such occupations were only in "for boys" books), I never thought the same about being doctor.
And, fundamentally, what changed in those professions is they accepted that it was them that needed to change to be more attractive, not some failing in girls.
To be clear, I'm not suggesting that they're paragons of equality because they aren't. But in the specific question of attracting girls, even ones who like "girly stuff", they have solved that problem admirably.
What's interesting to me is that male dominated fields tend to be those that are a free-for-all, that require no special credentials or vetting. This is not limited to tech, but seen across a wide variety of industries. Does this simply mean that men are more likely to be found in these careers because those are the jobs they are able to do?
In a perfectly free market, where anyone was free to do whatever job they wanted, perhaps we would see an even distribution of genders? But in this very non-free labour marketplace we have, with many artificial barriers to entry, perhaps that is what has lead to this disparity not only in the careers with those barriers, but also those without, rather than any specific gender having a preference for certain types of work?