I think that both OPs and reviewers should be encouraged to ask about the code's use case. For one thing, knowing the use case helps put the review in the right context. Sometimes code is being written just as an exercise, in which case reinventing the wheel is expected. On the other hand, if the code is intended to go into production, the proper response might be that the entire work should be replaced with a library that already exists.
If the code being reviewed is obviously meant to be called by others, then a review of that code should of course address ways in which it could be made more useful. Even if you didn't ask that question explicitly.
Sometimes I suspect that a piece of code attempts to solve a problem that did not have to be solved in the first place: it's an instance of the XY problem. In such cases, I think it's reasonable to ask the OP to explain the reason for writing the code. After all, the most beautiful, bug-free code in the world is code that doesn't even exist.