The companies that popularized this were and still are EXTREMELY lucrative, and get a TON of competition.
They can afford to be choosey. So they can try to find not only the person who can do the job but also do it BEST.
And that's really hard to tell from just looking at their work experience. You want to see how their brain works under pressure, dealing with an ambiguous new problem they've never seen before.
A lot of people who rag on modern tech interviewing don't get this. Unfortunately, so do a lot of people DOING these modern tech interviews. "He said the algorithm was O(n log n) but the answer is actually O (k log n). Not inclined"
And so, we spiral.
Selecting people based on how well they can code some linked-list traversal, in a web editor, while someone is timing them is not a good metric for overall "best". In fact you might reject candidates that think more about larger design problems, and overall your code might suffer.
This is the part I dislike the most. They usually disable copy-pasting too because they know it's that easy to google so you can't just code in your IDE and paste.
At some point it's all just signaling and wild guesses.
We use shitty algorithmic questions as a proxy for answering the above question (in the vast majority of cases).