In March, inside a small room at Tunisia’s National Engineering School of Tunis, six women listened, eyes wet, as one played an old song on her iPhone. The Arabic tune was a lullaby from a popular 1950s TV show that mothers had sung to their baby girls. The lyrics envision a future in which the little girl starts school and earns excellent grades: “And I will say ‘My girl has grown up, she will be an engineer’/ Oh people, oh people! I love her!/ She’s her mother’s lovely girl.”

For the Tunisian women—faculty members at the school—the song was a reminder of their childhoods. For the Americans, it was a reminder that they were in the right place. They had come to dig into an emergent and counterintuitive pattern of data: There are, in many cases, a larger proportion of women studying and pursuing STEM careers inside developing, Muslim-majority countries than in the U.S.—and in some countries, those numbers are rising further.

For Americans, the vision of a 1950s mother crooning such a lullaby to her daughter probably sounds anomalous. Back then, most women were neither encouraged nor permitted to work in a masculine career like engineering. And today, they are still underrepresented in STEM careers overall and in engineering specifically: Only 18.4 percent of bachelor’s degrees in engineering go to women, and women make up between 8 and 34 percent of the engineering workforce, depending on the subfield. A couple of years ago the researchers began to wonder: What could Americans learn about our approach to this enduring disparity by looking outside of our borders?

“The West has invested billions of dollars to address the issue of gender inequality in engineering and computing and has basically failed,” explains Washington State University adjunct associate engineering professor Ashley Ater Kranov, the investigator who came up with the initial research. “I started thinking maybe we’re asking the wrong questions—questions that won’t help us solve the problem.”

Ater Kranov, along with Jennifer DeBoer, an assistant professor of engineering education at Purdue University, recently came back from conducting research in Tunisia, Malaysia, and Jordan, all countries that they chose to study based on counterintuitive research that two other academics, Maria Charles and Karen Bradley, published in 2009 and then in a subsequent article in 2011. Charles and Bradley, professors at the University of California at Santa Barbara and Western Washington University, respectively, had found that the STEM gender gap was smaller in countries like Iran, Uzbekistan, Saudi Arabia, and Oman than in the U.S.—in other words, men still made up the majority of STEM graduates overall, but there were more women by comparison. They even found a reverse gender gap in those same nations when it came to certain STEM measurements—for instance, women in Iran, Oman, Saudi Arabia, and Uzbekistan earned more than 50 percent of the total number of science degrees. On the flip side, the Netherlands was the weakest country for women’s representation in science. A similar pattern held true for engineering: While the most male-dominated engineering programs were in developed countries like Japan, Switzerland, Germany, and the U.S., Indonesia boasted 48 percent female engineers.

Charles and other academic partners continued the research by asking eighth-graders around the world about their career aspirations. Once again, they found the same pattern: The more developed and affluent the country, the fewer female students said they wanted jobs in STEM when they grew up and that they liked math and science. This meant that the STEM gender gap contrast couldn’t be fully explained by economic decision-making—women (rationally) choosing more lucrative career paths in financially unstable environments. Separate from economic concerns, career preferences, too, were also divided along gender lines.

This research left Charles, and later Ater Kranov and DeBoer, scratching their heads. When it came to some of the more basic indicators of gender equality—women’s political participation, access to education and economic opportunities, and existence of overtly discriminatory laws or policies—women were for the most part faring better in the U.S. than in some of these developing nations.

So what were we missing, exactly?

Though Charles and Bradley tried to answer that big question raised by their research, their theory was limited by the data: They had quantitative research but no qualitative interviews. Now, DeBoer, Ater Kranov, and other researchers intend to interrogate the original theory by holding interviews and focus groups like the one in Tunisia. To help them analyze their data, they’ll use Charles and Bradley’s original hypothesis: that encouraging young women to “follow their passion” can lead to a reliance on gender stereotypes. How? Imagine a 10-year-old kid who’s told to “follow her passion” in order to figure out her career path. Though it’d be nice to think that she will find this passion by looking deep into her soul, she’s far more likely to settle on a path by observing what people who look like her do, by thinking about what she’s good at, and by considering what’s expected of her as a girl.

“In Western industrialized countries, we believe that women and men are innately and fundamentally different and tend to celebrate those differences,” DeBoer explains. Another contributing factor is the tendency to “assign gendered labels to different fields. In other words, we see engineering as a man’s work and a caregiving field like nursing as a woman’s work.”

In the imaginations of citizens of developed countries, “curricular and career choices become more than practical economic decisions … they also represent acts of identity construction and self-affirmation,” wrote Charles in Contexts magazine in 2011. But as Charles puts it, “occupational aspirations are social products, not intrinsic properties of individuals.”

In the U.S., that claim could almost be seen as heretical. Here, individualism and individual choice are the precious gems in the crown of American values. “The idea that our sense of self could be formed by something that’s outside of our control is countercultural and threatening,” says Erin Cech, an assistant professor of sociology at the University of Michigan who worked with Charles on the paper assessing the career aspirations of eighth-graders.

And yet the theory that career aspirations are at least partly socially constructed is corroborated by research into aspirational variation around the world and over time. (Women, don’t forget, were the first computer programmers in the 1960s and ’70s and were overrepresented among physics, astronomy, chemistry, and other science courses in 19th-century American schools.) But the more a career path is associated with one’s identity, as it is in many developed nations, the more it can also be tied in with existing gender stereotypes.

Or so the theory goes. For her part, Charles acknowledges that “the question of how societal affluence might promote gendered career aspirations remains open.”

The truth is that occupational patterns result from a complex interplay of both culture and biology—nature and nurture. Except for when they’re more straightforward. For instance, in Tunisia and Jordan, all students take a national exam after high school regardless of socio-economic status, and depending on their scores, they are funneled into particular career tracks. “The majority of women didn’t choose their professions; it was the scores that chose for them,” Ater Kranov explains. Top scorers are admitted to medical school, second-tier scorers are admitted to engineering schools, and third-tier are law students.

“A large percentage of girls aren’t driven by passion for engineering but by performance,” says Raja Ghozi, a Tunisian engineering professor at the National Engineering School of Tunis who has also studied in the U.S. Though Tunisian women can change their field of study to the humanities, they tend to stick with engineering because it’s something that’s been encouraged by their parents—often their fathers, Ghozi says—and because they know they’re more likely to find jobs in engineering in a country with a 15 percent unemployment rate. These women, she says, are taught to “complete the mission. Quitting or changing career direction for them is a failure, at least when they embark on their engineering education.” In many ways, that’s a virtue. But as a professor, Ghozi says she sees the dark side of this system in women who are burned out and unmotivated by the content of the work: “I think many of the girls could have been happier by allowing themselves to change careers, but the Tunisian engineering education system may not be that flexible.” (For what it’s worth, American society has its own flexibility problems: Elizabeth Garbee recently argued for eliminating the STEM pipeline metaphor in the U.S. because it perpetuates the idea that the only valuable scientists are the ones with Ph.D.s who have followed a restrictive educational path.)

Charles cites Organization for Economic Cooperation and Development research showing that limiting curricular choice in high school can result in more women in science and tech fields and a smaller influence of peers on aspiration. She acknowledges that this suggestion may strike some as “anti-democratic” but that those who are worried about undermining freedom of choice need to balance that concern against the possibility that girls’ and boys’ free choice isn’t really free at all but rather “constrained by taken-for-granted assumptions and cognitive biases about what they will like and what they are good at and by the social sanctions that they may anticipate should they elect to pursue gender-atypical educational and career paths.”

Though it will be months before DeBoer, Ater Kranov, and the rest of the team will be able to synthesize potential solutions from their research, there’s at least one emergent lesson for the U.S.: Passion for the field is important, but assuming that passion flows from biology or that it’s somehow innate ignores the ways in which culture and policy can reinforce girls’ STEM capabilities early on and encourage passion to develop.

We may think we’re rooting gender inequality out of our systems and institutions by targeting formal restrictions and overt discrimination, but it can still exist in covert ways. Often times, “equality is defined in formal procedural terms - as equal opportunities to realize preferences, which are understood to be properties of individuals” and therefore sacrosanct, Charles wrote me in an email. If a woman pursues a career as a teacher, she’s unlikely to see this choice as one of forced conformity to gender norms but rather think her aspirations reflect a unique mix of interest and ability. “This emotional buy-in is where gender segregation gets its staying power,” Charles says.

Though this may sound like a bleak assessment, it’s actually a freeing realization: Say you’ve always thought you were destined—or designed—for a particular career. That’s a powerful narrative and one that’s reinforced by the media we consume and the people we talk to about their supposed career trajectories. But this narrative can also be powerfully constraining—especially if you experience failure or crises of confidence, which most of us will or already do. If we let go of the idea that our preferences, aspirations, and capabilities are completely self-determined, perhaps we’ll truly experience a freedom of choice that has so far eluded us.