Homework: to Learn or to Value Education
Maybe in the US they phrase it as "acting white", but the same problem with educational underachievement in majority or all-white schools happens elsewhere, and it's bound up with class/socio-economic class.
The part about doing homework for parents versus doing it for the teacher is important here, and I think you dismiss it too easily. Teachers barely correct homework (mainly because they have so much of it each night to look over). If you do okay in class, they assume your homework is basically okay and just glance over it. What does matter is if your parents check that "did you do your homework? any problems? need some help?" and that's where problems do get picked up on.
Kids from lower-class backgrounds who are not succeeding in school do tend to have the "school is for swots" attitude; they don't want to be there, they don't pay attention in class, they don't see any value in education as leading to a job or a career or anything (and depending on their family background, they may not see 'get a job' as an achievable goal, you can have the 'third generation on welfare' attending school).
What makes the difference? Parental involvement and the attitude that "yes, school will help you get somewhere" and "education is for everyone". Not all the failing kids are troublemakers! Some are trying hard and do have supportive parents - but the parents have literacy problems of their own and can't help the kids catch up. Or the kids might otherwise try in school but the family background is so poor (broken families, tons of drama) and add in possible learning/psychological difficulties on top of that, and you get "school is for nerds and dweebs, I'm too cool for school".
If you're only doing homework "to get the teacher off my back", you're not going to learn. If the attitude at home is "who gives a damn about school?", you're not going to learn or to value education. And that then bleeds into the "don't act like a swot/don't act white" attitude where even trying is deemed uncool and can get you into trouble with your peers.
I've had some small work experience here, I've seen the difference between kids who are early school-leavers/dropouts, who have gone onto programmes for early school-leavers, and who want to learn and have parental support in this even if the parents have little education themselves, and the kids in the same category who are well on the way to "trying to get educated is acting white" (using that as shorthand for what, in an all-white context, is the same dismissive attitude based on "are you trying to pretend to be better than you are, better than the rest of us?") and are on the path to petty criminality and jail down the line, if worst comes to worst.