Various reasons.
To some extent, working with machines is not as appealing to women as stated above, but that’s not the whole of it.
With the hobby being male dominated to such an extent any girl or women participating risks various social costs from ridicule (“girls don’t do that”, “what are you, some kind of lez/dyke/other implication sexual oddness”), to being dismissed as a girlfrend/wife/daughter/whatever and ignored, to being unconsciously shoved away from displays by larger males intent on getting a closer look.
I speak from experience on all of the above. Including as recently as a few years ago when I went to fly model airplanes at a location and some old fart yelled at me to get off the flight line and out of the way of the pilots. To the credit of the other men there, they told him that the policy of not disturbing/talking to people actually flying their planes applied to women pilots, too, and stop being an ass.
As a result, girls who otherwise might be involved are discouraged, leaving only those girls with unusually strong interest in the topic (or are married to an enthusiast). Meanwhile, boys with minimal interest might either be encouraged or dragged along by a father, bloating their ranks.
What the F is with painting crap pink these days?
NO, simply painting something pink does not make it magically attractive to girls. I think that’s why I loathe the color pink so much. It was bad enough when I was a kid, now it seems to be mandatory for girls and women. It smacks of “separate but equal” to me.
What would help is making girls feel welcome at such gatherings, which can be as simple as making sure there are bathroom facilities for girls as well as men (I have on multiple occasions had to either use the men’s or find someone to unlock/turn on the lights for the women’s room at gatherings where it never occurred to someone that yes, a woman might be in attendance). When some male decides to defend “masculine turf” he needs to be told that it isn’t a boys’ club (such as at the RC flight line I described).
On the flip side, I’m also a long-term knitter/crocheter/crafter. It’s the same thing in reverse. Men need a place to pee, too, either their own toilet or assurance that they won’t get in trouble for using the women’s if needed. When some woman or cabal of them start getting bitchy and defending female turf they need to be reminded that, until recently, there was a strong tradition of men knitting and told to STFU.
In the end, though, you have to accept that certain activities are likely to be dominated by one or another gender even with a relatively level playing field. That’s fine, as long those interested are able to participate without harassment.