Deleted my previous answer, it does not actually address your question....
I noticed the likely reason was vaguely stated:
To the best of my knowledge, does the code work?
Is it work as intended, or run without errors?
Neither. It is somewhat intentionally loose. Defining exactly what 'working code' is will never be successful. What's important here is the 'best of my knowledge'. If you believe the code works, then you also believe the code is ready for review.
If you say: "it does not do everything it needs to do" then you cannot possibly believe it works. If you say: "it fails in condition 'X'" then you cannot possibly believe it works. If the code cannot compile, it cannot work.
Performance and security are interesting because they are not absolute concepts. They are relative. Is it "fast enough", is it "secure enough". As a result, you can believe it is secure enough.
Note, the questoin you reference is from years ago, and before the n-topic help page was edited, but, that question has:
The problem I am having is that there are enormous spaces in the output because I do not know how long the string was that the user entered
It is clear that the asker knows that the code does not produce the desired output, so it is clear the asker knows the code is not ready to be signed off as "looks good". As a result, it is clearly off-topic. The close reason would now say: "Questions containing broken code or asking for advice about code not yet written are off-topic"
Surely questions about
performance and security would also not work as intended (be fast and
be secure).
No, security and performance are relative concepts, and things can be performant enough, and secure enough. Even slow code can be fast enough, and just because something takes a long time, does not mean it can be made faster.
Though after reading some of the duplicates, i think that
line should be modified to read this:
Does the code produce correct output? If not, your question might belong on Stack Overflow.
No. That line will lose meaning. This is not about the code producing wrong output, this is about the code being ready for review. The code is ready when a reasonable programmer believes the code works for its intended purpose, and that he will reasonably expect to get a "Looks Good" stamp of approval on the code.
Ideally, every code review should be a candidate for a "looks good" approval, and every question should be asked with the expectation that it will get one. If the asker knows it will never get a "looks good", then it is not working to the best of their knowledge.