Leetcode type challenges are just a proxy for logical habilities, which are highly desired for SWE positions. It's not meant to evaluate every ability. Despite imperfect, I don't know of a better indicator that has similar cost. An employer won't spend a lot more to evaluate with perfection how good we are with logic.
It really isn’t. Asking people stuff like N Queens, Trapping Rain Water, and other such questions is really about if you’ve seen the problem before and studied enough to solve them optimally in under 20 minutes while explaining out loud.
It really is about testing how much you prepared for the interview and not the job.
I interviewed at Netflix and Google and not once did I see a question that was on leetcode. I had to think very hard about how to solve each of their coding questions. However, they didn't need any tricky esoteric algorithms either which I think was really well done.
Microsoft on the other hand, did exactly what you said, they just pulled the classics, which I think is less helpful. I guess it filters on people who have a moderately good memory and are willing to study.