In the US the problem starts in late middle school/early high school. For whatever reason, not having a remedial high school and not giving teachers the authority to push underperforming students to such high schools causes problems.
Teachers are forced to spend more and more time dealing with students who don't give a shit, and whose parents don't either. Source my wife is a high school math teacher