No, you are not misunderstanding anything. If a question shows absolutely no effort on the part of the asker, that is a completely valid reason to downvote. Other valid reasons to downvote include:
- The question is poorly formatted.
- The question is unclear or otherwise difficult to understand.
- The question does not contain sufficient information to understand or reproduce the problem (including sample code, in situations where it is necessary).
- The question is not actually a question, but rather a "task" or "assignment". This includes no-effort homework dumps, "plz send me teh codez", and so on.
- The question is too broad, asks for a recommendation of a library or other off-site resource, has nothing to do with computer programming, or otherwise runs afoul of one of our stated guidelines.
- The answer to the question would not ever be useful to another programmer; the question has some inherent attribute that makes it completely worthless. (Be careful with this, but it can be a valid downvote reason, even when it's not a valid reason to close.)
- The question is asking something that is already very clearly answered in the official documentation, or could be trivially answered by looking at the first 2–3 results on Google. (Another variation on the "no effort" problem. Again, be careful with this, but it is a valid and time-honored motivation for downvoting.)
In the first case (poor formatting), it would be appreciated if you took the time to edit the question and fix these formatting problems. In the other cases, you should strongly consider voting to close the question (or, if you don't have close-vote privileges, flagging it for closure).
But above all, remember that votes are personal, and you are free to cast them however you see fit (so long as you don't engage in fraud). Therefore, while I and many others will agree with you that question was poor quality and deserved a downvote, clearly there were at least three people who thought it deserved an upvote. They were not "wrong", they just hold a minority opinion.
It is difficult to explain why people vote for obviously poor questions. Perhaps they are the same people who ask such obviously poor questions in the first place, and have absolutely no quality standards of their own. Or perhaps they have the same problem and want to see an answer, without really caring about the quality of the question itself. Or maybe they're the type of people who will upvote any damned thing because they want to make Stack Overflow feel more "welcoming". Of course, it's also possible that Tim Post lost his keys again.
Either way, the great thing about the vote system is that the majority consensus will win out. This is why it's so important to vote on questions, whether up or down.
foo();
butfoo()
is only available in a higher version".