What, exactly, is wrong with this?
If someone posts a question that obviously does not belong on Stack Overflow, but I happen to know the answer and can type it out without significant inconvenience to myself, I will often provide it in addition to downvoting and voting to close the question for the appropriate reason.
Some people (like yourself) will punitively downvote my answer, presumably because I helped out "someone who should not be helped", but I think that's nonsense and I have enough rep that I'm willing to lose a little in the process of helping out someone else. Moreover, I know that whatever reputation I lose will be restored when the question is eventually deleted. I frequently check back and vote to delete myself after the question receives the other 4 necessary close votes and the asker indicates that they have read my answer.
One significant problem with this behavior is the misconception that downvotes are punitive. One of the other answers to this question unfortunately makes the same assumption, suggesting that you punish the user who answered the question by downvoting their answer. No, that's not what downvotes are for. You downvote content, not users. If the answer is correct, clear, and useful, then it should not be downvoted. In fact, it should probably be upvoted—but I'll forgive you if you refrain from doing that. Do make sure that you downvote the question, because that's really the content with which you have a problem. But leave the answers alone, unless they're bad answers that would independently merit a downvote, irrespective of the question to which they are posted. Don't let a bad question "poison the well" for the answers.
Yeah, I normally won't answer questions for people who ask in bad faith. But I might sometimes anyway, depending on the circumstance. I don't understand why this is the behavior you seek to punish. Isn't this exactly what we do on Stack Overflow—help people by attempting to answer their questions using the knowledge that we have?
Consider it this way: The fact that the question doesn't belong on the site is a meta issue that should be completely orthogonal to whether or not the question gets answered, or whether those answers deserve votes. You can post an answer and downvote/vote to close the question. The two actions are not mutually exclusive, nor do they conflict with one another in any way. In fact, they have absolutely nothing to do with one another. It isn't even reasonable to expect all users to be comfortable enough with the site's scope and rules to determine whether a question is or is not appropriate. If those users want to provide an answer, well then that's exactly what we want them to be doing. Let other users who do feel comfortable make the meta decision to close/remove the question for being off topic.
I seriously doubt that people do this for the reputation. That might have been the case prior to the recent changes to the reputation system, but now that your reputation score is maintained "live", this type of thing isn't going to work. Whatever points you earn from the answer will be removed as soon as the offending question gets removed from the site. And in my experience, this happens reasonably quickly.
If you really want to solve a problem, focus on:
- Educating or otherwise finding some way to persuade people not to ask these types of questions here in the first place, and/or
- Detecting these questions and getting them closed/deleted more quickly.
Either of these would be far more effective in solving the problem of "noise" on the site and the temporary reputation inflation accruing to those users who attempt to help people that appears to bother you so.