It depends on the school but I would argue that public schools are not in the business of instilling morals. Maybe religious schools or boarding schools can instill morals, but a public school is not going to overcome whatever bad influences a child has at home.
On the other hand, public schools can and should take measures to control the specific behaviors that happen inside that school.
On the other hand, public schools can and should take measures to control the specific behaviors that happen inside that school.