As said before: remove any selection bias, then hire those who can do the work, want to do the work, and have shown to do the work well before. Then measure performance and promote using the same objective processes. That's it.
Perhaps we can boil down the issue as the difference between making hiring as fair as possible, or making hiring ensure a certain outcome. The first option is good since it produces fair results, but the latter is actually what's happening in most places.