Many interviewers don't do this because it's often difficult to distill the most interesting problems down to something that would fit within the time allotted for the interview, and also there are candidates who prefer abstract textbook-style problems.
I stopped an interview once. I told the guy I didn't think I'd be a good fit for the organization, and maybe we should save ourselves some time.
I've done this a few times, each time from a startup that reached out to me asking me if I'd come in to talk to them, and then would throw me into their coding challenges immediately. Like whoa hold on there, I don't even know what you do, why are you asking me to do a coding challenge before we've even figured out if there is a fit for me technically and I figure out what it is you're trying to solve.
I've rarely used unprofessional language in job application emails, but on that occasion I pretty much told them to take their no-name little company and shove it.
[0] https://www.asktheheadhunter.com/15129/before-you-risk-your-...
My absolute favorite interview of the group, a guy who ended up getting hired elsewhere, was the most calm and professional developer I'd ever been around. Sitting in the room, I felt like he was interviewing us rather than the other way around. It was just in the way that he carried himself, answered questions.
And then the guy on our team started asking questions. The gentleman we were interviewing, rather than answer, kept calmly asking more questions of him instead.
- Can you describe the situation where this would be used?
No
- Have you ever run into an issue like this before that could be an example?
No
- How do I know that by solving this problem we would be addressing the business or customer problem?
We don't
- Then shouldn't I be solving questions related to the work?
...
I loved that guy. Wish we could have hired him because I really wanted to work with him.