Also, legality doesn't have a close relation to morality, so cooperating with people regardless of legality can also be noble or evil.
It's because of the holocaust that we thankfully have changed our collective attitude about such things. But in 1939, people's knowledge of the racial atrocities happening was very restricted, so I don't think we can underrate just how naïve some people where at the time.
What happened a lot at the beginning of WWII was that people didn't know what was happening at the concentration camps. And yes, there were some twisted moral templates at the time based on racism and dehumanization.
Oof, how I wish that were true. You may be interested in Pernick, Martin (1999): The Black Stork: Eugenics and the Death of "Defective" Babies in American Medicine and Motion Pictures since 1915.
Several nations (the US included) were well on their way to "Great Society" ideas of shaping the next generation by controlling genetics (be that in who reproduced or who was allowed to live). A lot of experiments ended abruptly when the Allies reached the camps, and a lot of politically-powerful institutions have kicked dirt over their own pasts to try and help people forget that's where we were headed.
(Quite a few experiments did not; forced sterilization wasn't outlawed in the US until, IIRC, the eighties).
Sure, being able to work with people who have different values is a noble thing. But what about whether or not they observe international law?
This is like a business saying "I cooperate with all customers, regardless of their criminal nature". That is a quite different statement.