I find it to be more nuanced. Your code has to work correctly in a bunch of scenarios. Some are very simple to see, others are nuanced corner scenarios.
A good developer will write code that passes many of these scenarios, but even the best will miss some. And an inexperienced developer might write code which passes some basic scenarios.
So, “this code works” is really a range, not a binary condition.
My high school computer science teacher (almost 30 years ago that is) used to say: "A program that 'almost works' is like a plane that 'almost flies'".
Now I'm just trying to mentally picture what a mode of transportation that almost flies would work like via animal metaphors - would it almost fly like a chicken? or like a flying squirrel?
A while ago I realized that the biggest thing that I like about software development is the simplicity within it's complexity.
What I mean by this is; software either works or it doesn't. In many other professions this is not the case.
So while there are many things that could be done better and more efficiently, at the end of the day, your code either works or it doesn't.
So simple, but yet, so ruthless.