Motivation goes beyond "being interested" in something. If you ask why there aren't more men studying art history it would be rather silly to say that men are less interested in art history. Then again, if you said that men don't pursue art history because they (most often) wouldn't be able to sustain a family on an art historian salary - and are expected to do so, while women find it appealing because appreciating art and understanding social and political undercurrents is more important than earning potential to them. (I don't know many art historians but see here for an example: https://www.pomona.edu/academics/departments/art-history/why...)
We could also ask why art history is not a candidate for "new collar jobs" (i.e., having people with associate-level degrees in art history) or why we don't have art history bootcamps for men. Part of the answer is that - at least since GC languages and Ruby on Rails - we do have good uses for people with shallow CS knowledge, or at least that there are less people interested in erecting high barriers of entry. The answer to that is that CS is thought of as skills-based and shallow, another aspect that is more likely to dissuade (especially white middle-class) women from pursuing a 100% CS career while it will help pull in people combining domain expertise with at least some CS skills.