STEM fields have long been plagued by gender inequality. Engineering, in particular, is a profession in which only 13% of the workforce are women.

Maybe girls just don't like engineering?

Not likely. More young women have been attracted to study engineering and hone their skills in math and science and at graduation, 20% of degree-holding engineers are women. However, a University of Wisconsin researcher found that 40% either quit or never entered the field after graduation.

Is it that there aren't a lot of mentors for women in engineering?

Do these graduates lack in self confidence?

MIT professor Susan S. Silbey and her colleagues from UC Irvine, University of Michigan, and McGill recently released the results of a study into the reasons women leave engineering that they'd begun in 2003. They followed both male and female students throughout the course of their four-year engineering education and at the five-year mark after graduation. Participants in the study submitted diary entries to the research group at least twice monthly, and completed surveys on a regular basis. One hundred students participated in interviews.

First of all, they found that men and women get into engineering for largely the same reasons, with the exception that women are more likely to want to make a difference in people's lives. Outside of that, people enter engineering because they're good at math and science and want to build a stable career as an engineer.

Where did it all fall apart?

1. Women are stereotyped by their peers in engineering school.

Teamwork is a huge part of engineering, but women felt they were given menial tasks in group projects and often relegated to outdated, stereotypically female roles like secretary.

As one participant reported, "Two girls in a group had been working on the robot we were building in that class for hours, and the guys in their group came back in and within minutes had sentenced them to doing menial tasks while the guys went and had all the fun in the machine shop."

2. Women are stereotyped by their professors.

Men were far more likely to share positive interactions and achieved milestones in their interactions with professors.

One woman interviewed shared her experience of winning second-place on all all-girl team in a design contest. As he was taking a photo of the winning group, the professor told them, "You guys look like professional catalog models; this picture could go in a catalog and you could sell big time."

3. Women are stereotyped in internships.

Internships and summer jobs were far more likely to have positive outcomes for male engineering students. Female students found that gender stereotyping often carried over to the workplace, as they were assigned tasks like sorting papers, photocopying and taking notes while their male counterparts actually cultivated their engineering skills.

One participant reported her supervisor told her, "No tank tops, now. We wouldn't want to distract the guys."

Another reported, "The environment was creepy, with older weirdo man engineers hitting on me all the time and a sexist infrastructure was in place that kept female interns shuffling papers while their oftentimes less experienced male counterparts had legitimate engineering assignments."

4. Women discover engineering does not fulfill their socially conscious goals.

The researchers found that some female engineers were disenchanted when they entered the workforce and didn't find the opportunity to instigate positive change that they'd been seeking.

Silbey says, "...many women discover in their internships that the engineering profession is not as open to being socially responsible or as dedicated to tackling pressing national and global problems as they had hoped. This is a result of the assignments they are given, the values that are supported, and the messages that are communicated to them."

The engineering field is literally driving women away. So what's the solution?

According to Silbey, changing the curriculum is the wrong approach. Engineering needs to tackle its stereotyping and gendered expectations, to start. In short, she says, "The culture has to learn to take women seriously."

Read Silbey's full analysis at HBR.org.