Casual games typically don't make you think, "Can I run this?" or "How would this be better if I had better hardware?"
One further point - maybe the 40% number is a recent phenomenon and it will take time for it to translate into more women entering computer science.
This is absolutely what pulls kids into games. What pulls kids into knowledge about computers is the realization that better hardware means they can play "better" games. This means they wind up with a pretty good conceptual map of computers at an early age. That gives them a huge advantage at programming over someone who just sees computers as a black box.
Nowadays most videogames are played in consoles, which are effectively black boxes (except for some very experienced hackers).