For software, for example, there are plenty of characteristics that some engineers may think are constant that are definitely not. For example, the number of systems I've encountered that have baked in the idea that first/last name can not be changed (even though names are changed by not only trans people, but also any married woman in many cultures), or assumed people only had 2-3 names (some cultures as many as 4 last names are common), is long. When the name is used as part of a permanent key for all other data about an individual, fixing the issue can be a huge hassle.
Sure, a product focus group might eventually point these issues out, but no one's changing their name in a short-term focus group study.
If you optimize for hiring the best rather than the best of X demographic you should see a higher bar being met. And this is where excluding other demographics potentially harm's outcomes but it's also the same reason just setting a quota probably doesn't improve performance.
How would you measure it for software engineering? Number of bugs? Number of features requested after initial project launch? Time to completion? All of those things have too many variables involved for any given organization. We already have a hard time measuring ability/quality of software engineers as it is.
But I imagine that is only true if it's done right and probably just setting some kind of quota to hire more of X type demographic is not it.