StackOverflow users at least tried to fight against it. The disdain for anything that looked like "homework questions" was one of the reasons it got a bad reputation among some people.
The problem isn't that the question is "for homework".
The problem is the lack of analysis that goes into producing a useful question for others that fits in with the rest of the site.
True, proper analysis of the homework rarely yields such questions, and even less so in 2025. But the point was always to have a question that's about a clear, specific problem, not about a task that was assigned. Because the latter can only possibly help people who were assigned the same task.