This has even occurred in jobs with highly specific needs. I got grilled on GPU programming, then never wrote or read a single line of GPU code. I got grilled on how the Buffer Protocol works in Python, then never implemented an extension class making use of it and never touched anyone else's class that did either -- even though it was "critical" for someone to have "significant experience" in these technologies when I was interviewed. As it turned out, my limited exposure to Python's setuptools and distribution/package management, and my (very limited) experience with an open-source optimization library called CVXOPT ended up dwarfing the usefulness of GPU or Buffer Protocol experience, and neither package management nor quadratic programming were even mentioned anywhere in either of those job listings, nor spoken about at all during interviews.
Employers, generally, are utterly terrible at communication or understanding what they need in their next hire, and they revert to simple heuristics, like algorithm or programming language trivia, just to avoid that hard work.
There has always seemed to be this silly and inexplicable emphasis in hiring on acting like candidates need to be perfect. They can't say they have a skill unless they are the world fucking grandmaster of that skill. Any honest admission of weakness means you're garbage, instant rejection. It's the same with performance during an interview. Someone clearly articulated an O(N^2) solution under time pressure? Firing squad. If they can't rattle off the optimal solution without hints then omg how did they ever get a college degree?
It's just nuts. People don't seem to think much at all about the person's aggregated productivity over time, what they can learn on the job, how their performance in a real-life, low-pressure situation will be different than a gimmicky interview. It's just all of this "we only hire the best" nonsense that leads to an arms race for candidates to overfit to interview processes and creates a whole generation of vapid engineers with no substance beyond looking pretty on paper.