Why do you think that the soldiers say: Sir, Yes sir!
It's because they respect the teacher or what ever it is.