Leetcode is implicit IQ testing. That is why they will likely keep it despite AI.
People use Leetcode because they believe it tests for programming aptitude.
There are also people who, no matter what, could not live code simple tree traversals or bin search or something, and it filters on that.
Finally, there's a pattern matching aspect to it. Some of the best interview questions I got involved very simple algorithms, but it was obfuscated by the problem. So the 'trick' was to just think through the problem and ask questions. Not to have memorized something obscure.
It's still not sinking in, 75 years after W. Edwards Deming, that the reliable way to hire people is simply to audition them doing the actual work their role involves.