Everyone always says this, but the fact remains that it is a filter in the sense that not everyone can learn it, or retain it. People always complain that the techniques requested in an interview are not required for the job. I see it in a different sense. The jobs they ultimately qualify for do not require such skills.
It's not so much that you can cram for this stuff (you can cram for anything, to some extent!) and more that this whole 'coding' interview and whiteboarding stuff has evolved into something that actively encourages cramming, and discourages professionalism and commitment to the actual work. It's indistinguishable from a cargo cult at this point.
Wouldn't you want people who care enough about their career to cram? That itself is a good signal. Cramming algorithms problems is difficult and succeeding shows grit. It also selects against sociopaths who BS their way through subjective personality interviews.