I think you're ignoring the aspect of social standing and prestige here. Plays are a big part of American culture at that age, and acting is a highly prestigious vocation in our society. A-list actors make huge amounts of money. It's the same with sports: school sports has a huge amount of prestige, and again leads to a highly respected and prestigious vocation with enormous pay. Women's sports has little to no prestige, but female actors like Julia Roberts are extremely well-paid, so while little boys pursue football, little girls (and some little boys) pursue theater.
Of course, these professions also have an enormous drop-out rate: for every superstar raking in big bucks, there's thousands upon thousands of others who end up waiting tables to make ends meet, and eventually drop out (and there's a bunch of B-listers who make OK pay but nothing spectacular). But every little kid in our society is taught to follow their dreams, no matter what the odds, because all our movies show stories of people who do just that and succeed, despite all the odds against them, and live happily in lavish lifestyles.
A robotics program isn't very attractive to kids because it doesn't lead to a career with lavish pay. No one is going to be a billionaire working as an engineer at some corporate job. So why should kids pursue it?
Some little boys pursue it: these are the boys who aren't cut out for sports or acting. They're generally introverted and not so social, and they're smart enough to realize that those career paths are foolhardy unless you really are super-talented. Those are the boys who go into coding or robotics programs. Little girls don't, because girls are more social than boys, and there's a social stigma attached to anything "nerdy" (even though everyone and his brother has a smartphone now, a direct product of nerds).
I'll bet if you tried an experiment in schools in India and China with kids being able to go into either a coding/robotics program or a school play production, you'd have vastly different results.
In summary, it's the culture, stupid!