What is security? Well, what sort of things do we want to keep secure? First thing that comes to mind is a door. Why does a door need security?
What is the function of a door? Quite simply, a part of a wall that opens, allowing a person to move through the wall.
Does a wall need security? Certainly not, it IS the security. The purpose of a wall is to keep things out. A door is designed to let things in, but only sometimes, and at the owner's discretion.