You'd think that, and it's probably even the smart strategy for the employer... But I remember what the guy who wrote homebrew said about his Google interview process.
Once an HR culture develops, anything sane or intelligent probably goes out the window.
Let me just preface that inverting a binary tree.. Maybe they wanted a particular answer and it was an off day.
That said, the author of Homebrew would be the top authority in the field of OSX package management yeah? I mean, Apple hasn't even bothered to create a competitor and yet every tech bro at Google using a MBP is going to need to install and use it..
I also doubt that Kenny was having to do daily scrums and explain why the web ad wootigulizer algorithm hadn't had any progress since Monday. Long since in executive management, is my guess.
But that said, not every company is trying to hire the best people. As you note, they're expensive.