There are two popular arguments for affirmative action. These are the Argument from Equality and the Argument from Diversity.
The Argument from Equality says that people from different genders, races, castes etc are the same. Members of these groups are equally hardworking, intelligent, enterprising etc. If one group is underrepresented in a field, it isn’t because of the personal characteristics of that group. Blame typically falls on “discrimination” – people treating individuals differently on account of prejudiced beliefs about their race, caste, gender etc. Affirmative action is required to fight such harmful prejudice.
The Argument from Diversity says that people from different social groups aren’t the same. They have different experiences, ideas, strengths etc. Members of a minority group have insights that members of the majority group don’t. Decision making, learning etc is better when there are a variety of perspectives at the table. Thus, preferential treatment for underrepresented minorities is desirable.
Both arguments conclude that institutions should provide favorable treatment to underrepresented social groups. However, they have opposing premises. The Argument from Equality assumes that all people are the same. Thus, under-representation is an injustice. The Argument from Diversity assumes that people from different social groups are different. Thus, some people to have insights that others lack.
A priori, there is nothing fallacious about either argument. However, a person must choose which of the two opposing premises he or she agrees with. If women are different from men, then perhaps it is these differences, rather than workplace discrimination, that causes women to earn less than men. The Argument from Equality fails. If women are the same as men, there is no valuable insight that they bring that men lack. The Argument from Diversity fails. You can either argue from equality, or from diversity, but not both.