There is a sense of cognitive dissonance... If the employee was "exemplary" up to this point and all of a sudden they are deemed "unemployable," wouldn't that be illegal and unethical?
Cognitive dissonance, a concept developed by social psychologist Leon Festinger in the 1950s, refers to the mental discomfort that people experience when trying to hold two or more contradictory beliefs at the same time. They may deal with this discomfort by changing at least one of their inconsistent beliefs or by forming a new belief to explain away the contradiction.
It could be argued that prejudice is a form of cognitive dissonance because people who hold bigoted views often must deal with evidence that doesn't match those views. In the context of employment discrimination, however, I think the dynamics are somewhat different.
There are several ways in which an exemplary employee can fall victim to discrimination in the workplace without any cognitive dissonance being involved. Probably the most common way in which it happens is a change in management. The employee is hired by an unprejudiced manager and does well in that manager's department for many years. Then the employee gets a new boss who is prejudiced, doesn't know anything about the employee's past performance, and doesn't bother to look into it.
Another way in which discrimination can affect an exemplary employee is when a manager assumes, based on factors such as age or disability, that the employee's performance is likely to decline in the future. The employee's excellent record is irrelevant to this sort of prejudice because it is based on the stereotype that older and disabled employees, even if they once were good workers, are becoming less productive as time passes.
Because of the large global labor surplus, many managers also hold the view that employees are easily interchangeable. From this perspective, even if an employee has an excellent record, replacing him or her is no big deal. Companies with this sort of attitude see no downside to terminating employees who belong to an unpopular minority group, as long as the managers think they can do it without getting sued. For example, in jurisdictions where the employment discrimination laws do not cover sexual orientation, some companies have had inquisitions where they interrogated their workers en masse about their sexual preference and fired anyone who refused to answer. After all, there's always someone else in need of a job...
So I don't see much cognitive dissonance when it comes to employment discrimination. Sadly, there seems to be much more of it in parents' attitudes toward their autistic children. Like other parents, they see themselves as loving and caring people who adore their kids and want the best for their family. But at the same time, many strident voices in society are exhorting them to fear, loathe, and pity autistics. The emotional conflict in holding both of these views at once is, to use an all-too-familiar term, "devastating."
Some parents react by denying the possibility that their child could be autistic. They convince themselves that the doctors, teachers, or other professionals who recommended an evaluation had no idea what they were talking about. Any evidence to the contrary is explained away somehow, no matter how difficult it may be to rationalize.
Other parents accept the reality of their child's autism but seek to reconcile their conflicting views by insisting that it is not a permanent condition. They engage in magical thinking, such as believing that the latest fad diet or alternative treatment will make the autism disappear. Because they don't see their child as permanently autistic, they avoid having to consider the impact of their prejudices on their child.
In some tragic cases, parents who held these conflicting beliefs persuaded themselves (or were persuaded by others similarly inclined) that murdering their child was an act of love.
It doesn't have to be this way. Parents can free themselves from the cognitive dissonance trap by choosing to examine and reject society's ugly stereotypes about autistic people; but, as we know from other civil rights movements, it takes a great deal of time, effort, and mental toughness to challenge widespread prejudices.