It seems simple to me: the instructor sets the rules for the assignment, and if the student breaks the rules, it's cheating. Plagiarism is one manifestation of cheating, but not the only one.
As with the law, ignorance isn't an excuse. If there's any doubt about whether something is permitted or not in your specific context (assignment, course and instructor), it's your obligation to ask your instructor for clarification. For example, if the assignment says "you may use online documentation", then you can ask whether reading SO counts as documentation.
Assuming reading SO is permitted, Let's say you searched SO and didn't find an answer. Can you then ask a question and "read" the answer? Again, it's up to your instructor.
Even if you're allowed to ask a homework question, how you ask it may impact whether it's cheating or not. Once again, your instructor has the final word. See How do I ask and answer homework questions? for our guidelines.
If you post your homework verbatim (even with an attempt) and someone provides a complete solution or a non-trivial component of that, then it's probably cheating by almost anyone's definition (but, yes, ultimately up to your instructor).
On the other hand, if the question (or search term) is a specific, commonplace problem, then it may be in-bounds, and is more likely to be within the spirit of the assignment. An example might be asking for help with mutex initialization as a sub-part of a multithreading assignment in a systems class. As always, though, even this may be out of bounds per your assignment guidelines.
Your example of corporate programming teams at career fairs is irrelevant. This was taken from a different context where presumably SO was allowed. If it wasn't allowed, then those programmers were cheating, and you're using a "but everyone does it" argument which isn't a real argument. I suggest avoiding the temptation of trying to ethically justify cheating in any form. The only opinion that matters is your instructor's.
Cheating achieves nothing positive: you harm yourself by robbing yourself of the opportunity to learn the skills you're in school to learn, you harm your classmates by throwing the curve and potentially creating an unfairly high standard by which their assignments may be judged, you harm the professor and staff at the institution that have to get involved with a huge amount of work to detect and prevent cheating (time that they could be spending actually teaching).
I see many students taking an attitude of "I need to cheat just this one time because of special circumstances" [sickness, financial pressure, expectations, perfectionism, perceived issues with the instructor, etc]. Don't even begin, and if you have begun, end immediately. Creating knowledge gaps rather than confronting them will just kick the can down the road, making it worse for yourself when you do finally face the music.