Indeed.
It kinda takes the fun out of programming. Sometimes you just don't bother with error-checking and with making code production-grade, because you just wanted to publish this small thing that other people might find useful. If people find it useful but find bugs, they might as well send pull-requests.
And let's be honest: error checking is important and everything but it's quite a chore.
Often in your toy project it's okay to be optimistic.
And often the purpose for writing a project is to explore a topic, not to release a production grade project.
Literally looking for their wallet under the lamp post because it's easy to pick nits in your homework assignments, but difficult to determine whether you could be a productive team member today under completely different circumstances with complete different incentives and forces on your choices.
> Oh, that was a learning project (or prototype code). If I were to write this code again, I would do $X
...where X is something like "use a unique ptr" or "assign ownership of this object to this other object instead".
They must have no training for their interviewers or maybe a training specifically to make them hostile gatekeepers?