There exists a relatively well defined set of rules in the Help Center that help guide us to deciding what sorts of questions are on-topic and should remain open versus what sorts of questions are off-topic and should be closed.
Despite this, sometimes bad questions that need to be closed are answered anyway. Clearly not everyone is familiar with the help center, otherwise the off-topic closable questions wouldn't be asked in the first place--and even if they were, no one would answer them, and instead would simply downvote, comment, vote to close, flag, etc.
So if a user unfamiliar with the help center asks a question that the help center says should be closed, yet before anyone notices and is able to get the question closed, another user comes along and posts an absolutely excellent answer to the question (in spite of the fact that the question didn't need to be open for one reason or another), does that suddenly make the question on-topic and deserving of being open?
A posted answer doesn't effect whether I vote up or down on a question. A posted answer doesn't effect my decision to post a comment asking for clarity or context or suggest that the question should be posted to another SE website instead. Should a posted answer effect whether or not the question gets closed as off-topic?