Computer programming once had much better gender balance than it does today. What went wrong?

One other factor not mentioned in this yet in this thread was the advent “PC” culture in the mid-80s, when the first “PC-compatible” computers came on the market, and before “PC” came to mean political correctness. It was a very specific social demographic. Building computers became the white male nerd equivalent of working on cars, and this eventually segued to “LAN parties”, multi-player games, creating web servers and “hacking”. Many from this group did go on to get CS degrees, and their influence persists to this day.