Outsourcing U.S. jobs to foreign markets followed by replacing local workers with foreign laborers has been the reality of the U.S. labor market for almost two decades.

Manufacturing was the start of outsourcing, and then employers moved on to back-room corporate operations such as credit card processing and call centers for customer service. This was followed by importation of workers from around the world for jobs in accounting, tech – and all the STEM fields – and health care. Still, some will be surprised to learn that even physicians have been negatively impacted by the importation of foreign labor.

Each year, hundreds of American graduates of medical schools do not match to hospital residencies. Under the current medical system, doctors who do not complete a residency cannot practice as doctors. While these doctors can reapply in successive years for resident positions, the chances of matching to a residency diminish as more years pass.

After a tremendous commitment to education of at least 20 years – that’s 12 years of public school followed by eight years of higher education – that doctors are shut out of their profession is mind-boggling. These are doctors too who are likely to have incurred hundreds of thousands of dollars of debt to obtain their medical degree. After completing a residency, an average doctor’s salary is approximately $10,000 a month, but without this salary, it’s impossible to service the huge debt load.

Even though they are highly educated, doctors cannot just readily choose another professional field. They have very specific training that doesn’t lend itself to other careers, and they may be seen as overqualified for many positions. As well, alternate careers may require more education, which a doctor already carrying perhaps half a million dollars in debt might be reluctant to grow. Even if one were to go this route, for instance, to obtain teaching credentials, the typical teacher’s pay would be insufficient to cover the debt load – and live!

It’s a baffling situation, certainly given how much attention has been given to a reported doctor shortage in the United States that’s expected to get worse, according to the Association of American Medical Colleges, which estimates a physician shortfall of between 35,000 to 88,000 by 2025. If there’s such a shortage, it’s difficult to understand how this year 1,927 U.S. medical school seniors and previous U.S. medical school graduates did not matriculate into residency training, according to the National Resident Matching Program, a nonprofit organization which matches the preferences of medical students to U.S. residency positions.

Further perplexing in the face of U.S. citizen doctors going unemployed is that at the same time, for years, non-U.S. citizen international medical graduates have filled U.S. residencies. Roughly 12 percent of the 30,000 residency positions in a year are given to foreign doctors.

For 2014 to 2018, non-U.S. citizen students/graduates of international medical schools who were given residency averaged 3,763 each year. For the same period, the number of U.S. medical school seniors and previous U.S. medical school graduates who did not obtain a residency averaged 1,894 each year.

Based on the math above, simply prioritizing American citizens who’ve graduated from medical school would ensure they all are placed into residencies, while still leaving slots for foreign doctors.

The unemployed American doctor is a story that’s barely been addressed by media, which too often in today’s climate is infatuated with elevating foreign workers over American workers. Media outlets including Time have given undue ink to the “plight” of foreign doctors working in the U.S. A Time article quoted an Israeli-born doctor working in the U.S. on a temporary H-1B visa. The doctor said he didn’t want “to sound paranoid,” but believes that “the current administration is trying to intimidate foreign workers and trying to intimidate hospital systems.”

That, or there’s the more obvious explanation once one looks at the facts. American citizens committed to a grueling, competitive education, expending significant resources of time and money, in order to become physicians. The country too made an investment in these future doctors through years of public education. To not prioritize U.S. citizen medical school graduates over foreign doctors is a huge malinvestment that makes no sense.

Kevin Lynn is the Executive Director of Progressives for Immigration Reform. Contact him at klynn@pfirdc.org.