Later in private, the commander reprimands the drill instructor: there were standing orders to never let a recruit hit you. They obviously have to punish recruits who strike instructors, but they do not want to. The drill instructors are supposed to be elite soldiers, and this one let a recruit get the drop on him, and that mistake cost the infantry a recruit.
MIT had sufficient opportunity to stop Swartz with technical countermeasures -- but they failed to do so. They allowed the situation to escalate until official punishment became unavoidable. MIT may claim that they did not want to punish Swartz; few people will argue that they did. It was not their intent but rather their incompetence that lead to his punishment.