In its best light, its discriminatory. How is someone with a life, such as children or other things going on, supposed to take huge amounts of time away from their personal life to practice skills that are unrelated to the thing they actually want to do?
one of my biggest regrets when doing my masters degree was spending my extra time learning things a data scientist would do. Like learning how to go through huge amounts of data, pull NFL data to see which yard lines on the field have the most injuries (1 and 2 yard line because of % of runs), learning NLP techniques like LDA, etc. Only none of this mattered, the guardian at the gate was asking me how to build and balance binary trees, etc.
The fact that I regret spending my time learning how to do the things the job requires is a travesty of the system. It exposes how asinine the whole system is.
There are so many things I want to learn and do - both technical and non technical. Including many things that will make me a better engineer for employers current and future.
But all of that is put on hold so that I can grind leetcode on my way into a better job first. Because nothing else matters.
Everyone's afraid of that rogue false-positive developer though.
What does that have to do with screening out assholes?
That completely dismisses the fact that the majority of businesses don't want good coders. They want adequate coders who aren't assholes. You can't create an online test that judges whether someone is enthusiastic, kind, honest, cooperative, and reliable. Nobody wants to work with a "10x developer" who passed coding challenges with flying colors but is unpleasant to work with. I'd much prefer to be judged based on my personality and my willingness to learn.
What you're suggesting would not solve any problems, and at worst could harm people's ability to have a job if employers buy into such poppycock.