You make a good point, but imo in real life there is more nuance to it than just works/doesn't work. Which again I've seen with the same collegues: the software works, sort of, yes. Despite some annoyances and known bugs and corresponding workarounds it does what it's supposed to do. But it's oh so brittle. So while you could argue that it works so there is no problem, in fact there is: on every single change which has to be made half of the software falls apart and it takes insane amounts of patching to hold things together. Sure, afterwards it works again, but adding more of the same code, no matter how fast it was written, made things surely not better. I admit this is of course like the worst example and I'm sure there are indeed occasions where the code quality doesn't have that much of an impact. For instance especially in small applications/tools/extensions this is true.
Still, fun to think about. If you know of any studies, I'm interested.
That is, if what they are writing works, despite having what could be seen as mistakes to a more disciplined practitioner, then what is the problem?
Consider, someone that has put together Ikea cabinets every week for the past year is probably hella fast at it by now. Can they replace a carpenter? Doubt it. Are they bad at what they do? Doubt it.