Respectfully, what I’m describing is not discrimination in the hiring sense. Discrimination is unfair treatment related to immutable characteristics about a person such as race, age, gender, etc.
You could just as easily argue that people “discriminate” against candidates by making them do leetcode, when leetcode is unrelated to performance at the job. Leetcode is a performance some people look at during interviews, just like how you socially meld in an interview is a performance people look at during interviews.