Votes have come in on my answer on this after it was closed. I might deserve them, but it seems a bit odd.
Closing (or indeed locking) a question doesn't prevent voting on answers. It doesn't even prevent voting on the question (although locking does).
If we lock individual / all answers (very rare), then that prevents voting.
This is by design. Just because something was closed as "no longer relevant", for example, doesn't mean that the answers were without merit; let 'em get their dues. In the "not a real question" example, it may be that you were able to infer enough from the question to give a good answer. Indeed, there is even a badge for great answers on downvoted questions (downvoted questions and closed questions have a large overlap).