Everyone feels pressure differently. For some devs a job interview whiteboard can feel like trying to code with a gun to your head.
I've known brilliant devs who froze under the pressure of an interview. And other brilliant devs who needed to meditate on something, or sleep on it, before coming back with the optimal solution.
I've worked with devs who tended to just run with the first solution that popped into their head, with no patience to mull over a variety of possible approach looking for the simplest one. These devs are fine for straightforward tasks, but become a liability when designing or writing foundational core code.
Yeah, this is me. Not that I'm brilliant, good side of solid is maybe a better description. But I freeze on whiteboarding and l33tcode. I taught myself binary search and insert sort in high school, but ask me to write insert sort in 40 mins with someone looking over my shoulder and judging and I'll struggle.
Every job I've gotten has come from a take home test.
I'm guessing it's far less prevalent than some people seem to think, and that unfortunately, there's no good general system for solving this.
The other possibility, which I don't know why shops don't offer more often, is a contractor position. I've never taken a job that I wouldn't have been happy to work as a contractor for a while first if they asked, and two of my best jobs start out as a contractor.
I personally dislike "whiteboard" testing as well, and I think it's usually very ineffective. I think some form of work-sample is best, in my 15 years of interviewing we'd usually do: one "open ended architecture" question (which can involve a whiteboard but usually only for diagrams, not code). Then a 1-2 hour programming task, on a computer with full access to the internet.
> [...] I don't know why shops don't offer more often, is a contractor position.
This is usually a completely different position, from many perspectives. It's usually a different budget for the group hiring - they can't easily convert "salaried" positions into "contractor positions".
It's also, in many jurisdictions, a very fraught legal situation. Contractors in general have different rights, but if a company is shown to hire contractors and treat them the same as employees, the contractors can often sue to get the rights of any other employee. This makes sense - it's so companies can't use contracting as a way around whatever legal regulations exist on employment. (Whether those legal regulations are good or not is a different question - but for sure you don't want there to be loopholes around your laws.)
So no matter how predictive they are, it's ineffective to use them because you'll identify good engineers... who will never want to work for you ¯\_(ツ)_/¯