Metal detectors help to keep students safe. It allows the school to have a way to control harmful objects from entering the building. This leads to less ways of critically injuring a student or teacher, should a fight break out. Because, lets face it, no matter what school your in, every school has a fight in it every now ad then, and having metal detectors eliminates most of those threats.
It is far too impractical to install metal detectors at every door. First of all, armed violence at school is far too rare to necessitate this level of security (and the costs associated). Secondly, some school equipment (like laptops, schoolbags or certain pens) are made partially of metal and would be detected far more often (and create far more false alarms) than weapons or illicit materials. Finally, the metal detectors create a sense of loss of personal freedom as people are no longer allowed to take anything metal with them into the school's rooms.
Although more prevalent in the news over the past few years, school shootings are occurring at about the same rate as they have throughout the country's history and they remain exceedingly rare. One is more likely to be killed by a police officer than to die in a school shooting. We need to retain some personal freedom at the expense of safety at all costs.