It is accomplishing something. When 40 different applicants are equally able to do the job, the only selector you have is "culture fit", which is where bias starts to easily kick in (race, age, whatever), and that is a legal risk.
The leetcode hoops exist to provide a provably objective measure for hiring, even though that measure is unrelated to job performance. It's purely a lawsuit avoidance mechanism.
Only those who can't or won't invest time creating a meaningful interview process fall back to leetcode.