There are enormous differences between suburban and urban schools in America and other countries. Children who attend one of the first often have many more opportunities than those attending an inner city school.
The main differences all come from the same root cause, which is a difference in funding. Suburban schools have more resources and smaller class sizes. Better funding and an easier and more satisfying teaching environment leads to better, more experienced teachers being attracted to work in suburban schools.
Discipline however is a combination of several factors. The main one is still under funding in urban schools. Uncontrollably large class sizes are common and the best teachers are understandably often attracted to better paid, more pleasant jobs in the suburbs.
However it is slightly more complex than this and social attitudes play an important part. Suburban children are expected behave reasonably well at school and succeed academically, and this becomes a self-fulfilling prophecy.
Conversely children from poor backgrounds might well think school is a waste of time, be resentful of authority, and wish to establish themselves socially by rebelling. There are good reasons for these attitudes but the effect is to make urban classrooms even more difficult places to learn and to teach.
The result of these differences is an ever more stratified and immobile class structure. Middle class children go to well funded middle class schools, getting the education that enables them to get middle class jobs. Poor children go to under funded schools and are unlikely to get the qualifications they need to socially climb. Intelligence, ability and motivation have very little to do with the education somebody gets any longer.
To redress this inequality is not as difficult as most social issues. Urban schools basically need smaller class sizes, more and better teachers, and more resources. Social attitudes do play a part, with suburban children being expected to do better than urban ones, but this is not the main issue.
On the personal level, if your children are attending an inner city school they are at a disadvantage but there are ways to compensate for this. Inadequate teaching can be, to some degree, mitigated by teenagers using their initiative. There are excellent resources available online for all school qualifications. If the teacher is too busy to explain something properly then it is possible for a student to go and find out the answer independently.
Yes, it is unfair that children of average intelligence and ability will probably achieve an excellent education (and career) in one place while exceptionally talented ones might struggle in another. However families have to deal with what they have, while at the same time pushing for change.