The theory says it shouldn't matter who you are it should only be based on your professional ability. And in theory it wouldn't make a difference to the ability of a company to function whether the gender or racial mix was one sided or not.
The reality is different. The reality is that having a uniform gender and race mix across a company causes all sorts of problems to the culture which in turn flows through to the companies actions and behaviours. And so if you want your company to be healthy you need to have at least some mix of men and women and races because the fact is that employees simply behave differently when there is a mix.