That's also because in addition to testing if you can solve the problem, they're also testing your _judgement_.
It's an interview. Just like any other engineering problem: use the right tool.
If you go off tangent and don't solve the problem, then that raises the question: "Ok, the engineer seems to be able to code, but they didn't finish. Will they finish other work? Will they regularly get caught up in irrelevancies?"