In my experience it's pretty necessary to do this. Probably depends on your local job market, but there are a shocking number of candidates that just don't know how to code.
The explanation I've heard is that good devs generally get hired after only a handful of interviews, whereas really bad devs are going to do a lot more interviews on average before they get hired, so you get a pretty skewed sampling even if there aren't that many really bad candidates around.
Yes, Joel Spolsky and IIRC Jeff Atwood have written somewhat extensively about it.
We are in a bubble, if we read programming blogs and think about programming in our free time, we are definitely not the kind that FizzBuzz exists to filter out. But from the perspective of companies, it makes sense if they really understood pointers or recursion or graph manipulation, because there are so many people lying on their resumes, not having sufficient analytical skills despite doing some resume driven cargo cult development etc.. And as an industry we don't really have an alternative to these algorithm interviews at scale, at the point we rely on non technical HR people to filter out resumes for us and they literally grep for framework/language experience.
Real jobs have certificates and degrees that mean something, where you can avoid the whole "do you know literal 101 things" phases of the interview process by just going "do you see the line on my resume that says M.Sc."
I don't know what your hiring experience with this is, but there is an entire market around "coding interviews" where people will learn how to pass these. I found algorithmic interviews completely useless to assess junior engineers because of how many just learn just to pass interviews, but then have very little experience with real problems.
If you want an example of this, check out r/cscareerquestions. The standard advice is not to practice any practical coding with projects, but to "grind leetcode" to get past interview filters.
If you want experience with real problems, they juniors should not be your thing. Juniors are supposed to be people with little experience that are able to work if given tasks by seniors.
A lot of candidates can't reason past the simple stuff so rarely do I have go beyond a simple coding problem. The FAANGs and unicorns maybe get lots of candidates so they can be very choosy.
Is this really a useful exercise? Why not present them with an actual problem that is relevant to your field and see how they approach it?