The unfortunate reality is that If you don't do this you'll hire people who can't program
But having experienced leetcode-style interviews on the candidate side, it's clear to me that they are no longer about figuring out and coding a solution on the spot. Interviewers expected a solution FAST, and to match that you need to have studied and learned the answer beforehand.
Yeah this is the real BS behind the tests. Good interviewers help you manage and try to find a solution. Not just "answer is binary tree"
But that "something" doesn't have to be leetcode. There are much better (and less abusive) ways of doing the same thing. All it takes is a programming problem that they've not seen before. That's it.