Things that open-ended are ripe for abuse, which is to say when you have a team of white techbros, guess which candidates get high marks on these ad-hoc questions?
I agree with pjmlp, it's become a substitute for actually interviewing/evaluating the candidate. Especially if they are trying to hire for something they don't already have, it's a form of bikeshedding. For example, if they need a database expert because the team has been faking it until this point, they can either learn how to hire one, or they can focus on brain teasers and "culture fit", and feel good that whether or not the person is expert, they passed the test.
Companies are groups of people behaving a certain way, and jobs are behaving that way. As an outsider, you don't know what the job is. If the interview is a bunch of questions you think is stupid, then the job is probably doing a bunch of stuff you think is stupid. If you want the money and prestige anyway, then learn to do the stupid stuff.
You understand that this is a job interview working as intended? You may be awesome at the work but your values do not align with the company’s and it’s best if you don’t work there.
So if somebody tried to solve the brainteaser with an impossibly high likelihood of being completely wrong. You get the signal that their values match yours, they are open minded and that they are good at writing great programs?
Again, I’m not saying that job related questions are bad. I’m saying that these types of questions can be good. You can ask more than 1 type of question!
Mostly of the same basket and equally bad, on my experience, because usually it is some dude or gal, that rather be coding than doing interviews that gets dragged to question this guy that just dropped on reception for the interview.
There are other ways to assess those skills, sure. But questions like that aren’t bad ways.