If a question is not good enough, why do people consider upvoting its answers?
Because every user is free to use their votes as they see fit (with a few exceptions, e.g. targeted voting or voting fraud). The rest would be guesswork.
Ideally, votes would be used to express how useful a post is. And even horrible questions sometimes get reasonable answers, which may get an upvote or two.
If a question should be closed, ideally no one answers it. Because if it has an answer, the incentive to improve the post and make it suitable for the site is greatly reduced. And giving it an answer that gets upvoted then blocks the Roomba from deleting it. But life is never ideal...
For meta sites, there's the added complication of votes also being used to express (dis)agreement. So a question can be downvoted, while an answer disagreeing with the question gets upvoted for expressing a more reasonable opinion.
Doesn't that mean that there's a possibility that someone would have the same question and accordingly, it is useful?
If so, if that user can find the question, they can upvote it themselves. But that requires a question that's well written enough to be findable, as that make it useful.
Ideally 'someone may have one day have a similar question' is very, very low on the list of priorities when voting, as that's likely to happen anyways, so it would mean unbridled upvoting. A better question to ask when voting is 'if someone were to have a similar question, how well would they be able to find the answer to this one'.