I said nothing about gender and ethnicity. Diversity is a concept that goes beyond that. You can be a white straight male and still be a weirdo, or a black Hispanic lesbian and still be a conformist.
If you are determining diversity by sex and skin color, I'm saying that you are making judgements about people's background, tastes, culture, etc that are racist and sexist.
You can't really create diversity directly (people feel comfortable around those like themselves), instead it happens organically because people turn out to be naturally different, BUT you can definitely act against it through bias based on gender, ethnicity, age, looks...
The goal is to let diversity thrive through environments and hiring practices that are free of unnecessary bias, but old habits take a long time to break.