From my perspective, homework questions can be no different from regular questions, and typically deserve to be answered. Asking a question about basic programming concepts is not any less legitimate than asking questions about the particulars of IE's JS engine.
The other thing is, even if you don't think you should answer the question, someone else inevitably will (unless the question gets closed). There's always people on SO willing to pick the low hanging fruit.
One might say it depends on the content of the question. For example, a question like "what makes this method O(n^2)?" is a lot different than "please write bubble sort in Java." At the same time, these are all questions that someone trying to learn a language must answer at some point.
It doesn't seem to be up to us to enforce someone else's bad behavior in their classes (like cheating online), and it'd be a difficult policy to enforce should we decide to do so. And all questions are questions, ultimately.