Yes, it's just not fair.
It's not fair that children from calm, orderly homes with access to significant resources also get a positive, nurturing school environment where they're treated as human beings, while children from chaotic backgrounds are retraumatized and written off in schools where they're shouted at, controlled and treated as less than human.
I really worry about the effect it has on teenage girls especially. Imagine you come from a deprived home, parents absent or working constantly, already feeling marginalised. And you go to a zero tolerance ultra-strict school where you're expected to conform absolutely and punished harshly for the slightest mistake or things beyond your control. What does that say to you about your worth as a human being and the way it is acceptable for people, including future relationship partners, to treat you?
If we're expecting teenage girls to spend their formative years in ultra strict, coercive environments where they are shouted at, treated as sub-human, have little autonomy and are expected to comply unquestioningly, how can that not have an effect in terms of making them vulnerable to abusive relationships later on in life?
Children from non-disadvantaged families understand societal rules and so can be better relied upon to cooperate. They also have parents who support the school in their policies.
I don't see securing order and compliance as a justification for essentially subjecting children from disadvantaged backgrounds to what often seems to amount to a form of psychological abuse and extreme control. They need more help, support and warmth, not less. I don't know what the answer is, but taking a less punitive and more therapeutic approach towards children who struggle with school might be a good start. And also being more realistic about which aspects of the curriculum children who are struggling with school are going to be able to access, at least at first. Get them into school, make sure they're safe, warm and fed and give them something, anything to do, even if lego or doodling, and then when they feel less threatened, try to increase the academic demands.