I have repeatedly seen this happen personally, and every single person in my professional network who I trust enough to have a candid conversation with on this topic has seen the same at least once (in fairness, that is only 3 people. but broaching this topic with the wrong person is very risky). There's quite a few people in this comment section attesting to this as well.
Is there a threshold you have in mind for a number of people who would need to speak up before you believe they aren't mistaken or lying? Would the only thing that would convince you this is happening be some kind of large scale study? If so, do you honestly believe such a study would ever actually be conducted, or that anyone would be willing to open themselves up to the consequences of gathering evidence on this? Even if someone was willing to try, do you think it would actually be possible to gather evidence that companies discriminate on the basis of gender or race when making hiring decisions?
I'll happily change my mind in the face of evidence. Usually I see a lot of hand-wringing and speculating about it, rather than anecdotes and data. Proving causality in some kind of observational data set might be difficult, but I am not one to discount individual people's experiences either.
So if you have examples of unqualified candidates being hired on diversity grounds, then I'd like to hear your stories. In my own professional and social circles, it's very rare to see an unqualified hire at all, so maybe my personal sample isn't where the problem happens.