My elementary school was an open school. They built walls when I was in high school. My room is locked all the time. I have something on it to allow students to enter.
At my last school they required us to lock doors and at my current school they want us to leave them open. They're both schools in urban settings and both policies were for safety. I've thought it was interesting that these were two different reasons serving the same purpose. My current school's reason is because if we have a lockdown we don't want kids who are in the hallway to be stuck. I'm kind of torn on what is the better solution. I'm not really keen on the "sitting duck" lockdown procedures at this point.