You're missing my point. If all 'ethical' companies treat all ex-employees of 'unethical companies' as unemployable, they are effectively only going to work at 'unethical companies' regardless of whatever mindset has shifted over time.
That said, if some ex-Palantir worker was somehow working for UNICEF – to take an extreme example – it would be a little awkward unless they had denounced their old company in a fairly public manner.