Sounds like he's almost accidentally stumbled upon the idea of intersectionality.
Many businesses have a "front of the house" consisting of people that interact with customers, clients, etc., and a "back of the house" that might be comprised of warehouse workers, etc. Many businesses in the south used to only hire white people in the front of the house, and only men in the back of the house.
After civil rights laws came into effect, many of these businesses argued that their hiring wasn't racist, because they employ lots of black people (in the warehouse). And they're not sexist, because they employ lots of women (in the front of the house). But if you're a black woman, you're still out of luck. Because of this, the courts ruled that these policies are still considered discrimination on the basis of sex/race. Yes, these hiring policies weren't discriminating against ALL women, but just a subset (women who happen to be black). Or looked at differently, a subset of a race (black people who happen to be women). Either way, it's still discrimination against a protected class - both intuitively, and by law.
Similarly, this decision states that firing someone because they're lesbian or gay would be discrimination against a subset of women (women who are attracted to women), or a subset of men (men who are attracted to men).
In cases involving the protections of individuals, you can't start by looking at the aggregate of all the people working at the company, and analyze the company hiring policy, attribute-by-attribute (e.g. sex, race, etc)., in isolation. It'll still lead to discrimination, because each individual has many attributes, and the combination of those attributes can be the source of the discrimination.
Instead, you have to start with the individual affected person who brought the case forward, look at all of their attributes, and if changing any one (protected) attribute (in this case, sex) would lead to a different hiring/firing decision, then it's considered discriminatory.