A closed question, generally with the exception of duplicates, indicates a question that is not desired. It is a step towards deletion. The general scenario is that you don't want to reward a behavior you do not desire. To that end, if someone is getting answers to their question here, that's rewarding - they're getting what they needed from this site. It's not really striking home the point that this isn't where that information should be obtained. As such, they may just return and ask new questions, if they'll keep getting answers.
This is more in the case of answering in spite of knowing that it is going to get closed. Especially if you're answering a question that you yourself are voting to close at the same time - then it's just callous. A conflict of interest, one might say.
In general, if you think the question should be closed, you should not be answering it. If you think it should not be closed, but that it might, then your attention should probably be on fixing it (revising or comment support as necessary) so that it either doesn't get closed or gets reopened.