I can’t speak for anybody who made you an offer, of course, but often these kinds of problems are just another way to witness first hand how the candidate goes about solving problems. Failing to solve the problem given a short window of time is indeed not relevant, but your problem solving process is _extremely_ relevant. I’ve spent a lot of time fixing crap because some engineer was engaging in “magical thinking” that the cost of not doing such screening is clear. Brain teasers can be hit or miss, so I don’t particularly like giving those to candidates (though as an interviewee I loved them), but you can get a great idea of someone’s appetite for doing the mental work of problem solving through a thoughtfully-designed code screening.
I covered this in another reply, but if you use this process to see how I solve problems, you will conclude that I don't. You will witness me doing nothing, because I can't do anything in that circumstance.
Edit: nevermind, you already wrote about this elsewhere. Leaving the below here for context.
I'm curious, is this more of a social block or is it specifically the work medium (e.g. a whiteboard) that gets you blocked? I personally would happily let you use a laptop with whatever tooling you're most comfortable with, for instance. IMO whiteboards are okay for communicating high level architecture/ideas but abysmal at writing complex solutions (and IMO whiteboards imply you ought to have memorized the thing because of how punishing it is to need to rearrange content).
This is the claim, of course, that solving the problem is not what matters.
However, in practice, it is what matters, There is a "minimum" threshold (I can attest to this because I've been on the other side having to conduct them) where you more or less, must finish at least with some viable answer - even if unrefined - or you won't be moving on, full stop
I mean, sure, if you boycott the question you probably won't move on. But I'm not sure I want to work with someone unwilling to be curious or participate in problem-solving together. To me this filter is a positive effect of the test. In the interviews I've given I'll even handhold an applicant through to the optimal solution if need be, because to be perfectly honest I'd much rather have a coworker who is enthusiastic about learning and shows the ability to collaborate than someone who can write code but refuses to do so in a social setting (i.e. an interview). I want someone that I can have an intelligent conversation with because _I need my ideas validated, too_.
> refuses to do so in a social setting (i.e. an interview).
Interviews are very different from working together collaboratively. They're very different from presenting work to or working with a client or stakeholder, too, and even very different from a sales presentation. The space of things that might come up is effectively unbound, how you're being judged is wildly uncertain, you are being judged, and you know almost nothing about the people you're "working with". As practiced in software, they're closer to being called in to give a thesis defense without knowing in advance which thesis you'll be defending—and also everyone in the room is a stranger, and also you have no clue which aspects of your performance are being judged or by what criteria, and even know for a fact that some of the people conducting these have completely opposite opinions about which behaviors are desirable and which are "red flags".
I don’t think based on what I’m reading here that this is a criticism of coding during interviews so much as it is a criticism of candidate-hostile atmospheres in general. I’d also point out that social interactions are predicated on judging each other, and that this is healthy. It’s also not all one-sided. As an interviewee I choose to approach interviews as a process of satisfying my own curiosity and the curiosity of the potential employer about our viability as partners. That process doesn’t have to be a negative experience, and I don’t think a code screen or brain teaser really contributes directly to whether it is or not.