Some men apparently feel discriminated against by science, technology, engineering and math programs that seek to boost participation by women in those fields, and they have turned to legal challenges to try to dismantle such efforts. The U.S. Department of Education is leading more than two dozen investigations into such complaints, which could threaten scholarships, workshops and camps for girls and women.

Maybe the men behind these complaints need a little refresher about why these programs were created in the first place — and why they are still needed. The gender gap in these professions is still a very real and vexing problem, and until more progress is made anything to achieve more balance should be strongly encouraged and supported, not attacked and protested.

Yes, some improvements have been made over the years, but far from enough and definitely not to the point that men should suddenly feel victimized. Women make up half of the college-educated workforce in the United States, but only 28% of those working in science and engineering careers. In other words, men still dominate STEM fields.

Women have earned 57% of all bachelor’s degrees and half of all science and engineering degrees since the 1990s, but they tend to lean more toward life sciences, according to the National Science Foundation. Women earned more than half of undergraduate biological science degrees in 2015, but just 18% of degrees in computer sciences, 20% in engineering 39% in physical sciences and 43% in mathematics. Representation of women of color is even lower.

All of these trends continue into the workforce and, even worse, the women who get the same degrees and work just as hard as men take home smaller paychecks once they establish careers. Look at the board rooms and executive offices of the top technology and engineering companies; they are largely dominated by men.

U.S. Department of Education regulations clearly allow for affirmative action programs to level the playing field in areas where there was “limited participation” by certain groups. We would say there are pretty big disparities that still exist.

We are not sure what statistics the opponents of women-centered programs are basing their arguments to rid of these programs. The Maryland-based Stop Abusive and Violent Environments, a group focused on the supposed scourge of false accusations of sexual assault on college campuses among other things, says that 57% of more than 200 colleges it studied have scholarships aimed at women that are discriminatory. The group, in a study that came out last month, singled out five universities in Maryland for having scholarships it claims are discriminatory or borderline discriminatory, including Johns Hopkins University, Montgomery College, Community College of Baltimore County, Towson University and University of Maryland — University College.

One of the loudest opponents of targeting women, Everett Bartlett, told the Los Angeles Times that the “pendelum had swung too far in the wrong direction.”

We pose this question to Mr. Bartlett: Just how many of the science and technology jobs are women entitled? The reality is that the pendulum has a long way to swing before we reach anything close to equality.

If these complaints are successful, the country could very well lose ground on diversifying the STEM fields. Women-focused programs help with recruitment in a society that still sends messages that girls should not pursue certain careers or appear too smart. Girls who are exposed to role models in challenging STEM fields will be encouraged to pursue those careers. Women also need to see other women like them in the workforce, and female executives are needed to create a culture that is welcoming to women. A study published recently in the journal Proceedings of the National Academy of Sciences of the United States of America found that many women leave STEM fields after giving birth to or adopting their first child. Perhaps a culture of rampant sexual harassment would not have been accepted at Uber had more women been involved in decision-making.

We certainly hope that the federal education department will think about the strides that have been made in gender diversity with women-focused programs as they conduct their investigations. Sadly, we don’t know how much of an advocate there will be in Education Secretary Betsy DeVos, who has worked diligently to undo other Title IX protections for women. Many universities saw minority enrollments drop when programs aimed at racial diversity were determined to be discriminatory. We don’t want to see a repeat of that history.