So he did the three weeks, passed the leetcode, passed the interviews, and now makes 400k.
When I was 10 or 11, I asked my dad what MIT was looking for in a student application. He (an MIT alum) told me. I picked out the things I could do (being captain of the football team was never going to work for me), applied to MIT, and got rejected. But Caltech, Dartmouth and Johns Hopkins did admit me.
You do what you gotta do.
The biggest problem, of course, is that they also filtered qualified candidates (I personally got filtered out multiple times and I'd like to believe I was qualified!) But it is an understandable compromise whenever there is an extreme asymmetry in the volume of candidates and volume of interviewers, and the fix for that is simple: you study for the test (as you pointed out.)
Note also that as grandparent comment indicates, this test is a necessary but not sufficient condition; it's just to get your foot in the door for a deeper evaluation.
And leetcode is not something you prep for once in your life, but every time you switch jobs.