"I personally don't recommend those kinds of companies "

You wouldn't recommend Google, Microsoft, Facebook and a host of the best companies in the world because they do 'white board interviews'?

You're not only working against the data here, you're working against reason: asking people to solve problems that they may encounter on the job is an excellent means of measuring a number of things, even beyond their ability to solve this problem.

There are still quite a lot of 'senior engineers' who actually might be valuable in some specific circumstances, who can't walk through problems or write decent code at all.

This example [1] from Google is really quite good. If you watch carefully you'll see how many elements and opportunities there are for a 'good developer' to shine both technically, and also in terms of communication. And also for 'ok developer' to just do an ok job.

They're not asking bizarre or impossible to solve questions that you'd have to study for either.

"That can be, especially for junior engineers."

No, it's good to weed out 'senior engineers' who think that their experience and 'good relationships' entitle them to a job.

"I don't want to burn myself out doing unpaid work" - an on-site bit of coding is not 'unpaid work' - please don't take this angle that your (or mine, or anyone else's) bit of quick hacky coding is 'work' that could be useful really in any way.

This is different from a '2 hour but really 2 day' take home test which is ridiculous.

"And yet I've been explicitly hired because I had coded something relevant on my GitHub profile"

That's good - and I suggest in many scenarios that may be just fine, but it doesn't abnegate the fact of the matter: that 'white boarding' and 'on site coding' (specifically not big ugly take home projects) are an excellent means to measure core abilities.

"but what you are suggesting represents exactly the type of company I want to avoid for good reason"

Again, the best companies do this for a reason. If you want to avoid a massive tranche of the best companies in the world in various corners and niches then that's a personal decision obviously.

Finally - the most contentious 'brain teaser' - they come in two types: the 'tricky problems with solutions' and the more 'open ended types'.

MS used to ask the former "i.e. a kid, an adult, and a row boat owner are at the side of river and must get across with a watermelon. But the kid can't row, the boat owner won't take the watermelon etc. etc." - these I don't think are very helpful in most cases.

But the consultant type question: "how many tennis balls can you fit on a 747" - these can be enlightening. I was asked once "Quebec separates from Canada, how do you divide the national debt" in a consulting interview. Very good question. Aside from the problem of some people getting nervous, and not being very good 'on the spot' (to which I would encourage giving time to think about it), you can learn quite a lot about people in these scenarios. It's an opportunity for people to think about a problem in different ways, to apply some of their niche knowledge, and importantly to see if they can come up with a very crude, ballpark answer to a fairly ambiguous situation. This might be more apt to consultancy types of situations, but I think there's value in software as well, given the right kinds of questions.

[1] https://www.youtube.com/watch?v=XKu_SEDAykw