I don't care about the rep, but was that necessary?
No. But the system is there so people can choose to downvote or upvote as desired.
It is not our place to determine what help a student should or should not receive, and I strongly discourage downvotes for answers to homework questions.
The student asked, we answer.
Some people believe that the best route is to force the student to think about the problem and solve it themselves. A few of these people will choose to penalize others when they don't follow their belief. It's sad that they choose to enforce their beliefs via downvoting, but that is exactly the mechanism given to the community to direct itself, so it's a valid choice.
Don't take it personally. As of now more people agree with you than agree with the person that thinks you shouldn't be so free and easy with information.
Yes, the student may in fact be giving themselves a worse education than if they broke the question up into pieces and asked questions that would lead them to the answer.
Is it our place to determine how to educate them, though? They are in charge of their learning.
If one doesn't want to provide an answer to a homework question and instead try to teach the student the principles that will lead them to the correct answer, one should post comments, unless the question specifically asks for answers that are basic principles.
The answer to a question, "What is the answer to the problem X?" should be the answer to the problem X.
tl;dr
The answer to your question is that people are free to vote according to how they perceive the answer as "useful" or not. Some will base their decision on whether a question is for homework or not, and whether they believe students should receive indirect answers to direct questions. It is entirely within their right to downvote according to their own model of what Stack Overflow should be.
homework
(namely: just marginally wrong enough to click the downvote button), surely it's wronger for a professional. Then again I have seen questions from pros that looked like the asker wanted me to do a bunch of work for them for free, which I found a pretty strong disincentive.