I am ex-army and ex-teacher and I can tell you imposing discipllne in the army is easy compared with teaching, because in the army you get 100% backing whllst in teaching there is little or no backing.
A classroom teacher is frequently not backed by the headteacher who often does not get the backing of the school governors, who are in turn are overruled by the local council and the government., and in most cases the school is not backed by the parents of the child concerned. Even the police are reluctant to get involved for the same reasons.