When the door is closed, the switch is pressed, completing an electrical circuit and signaling to the vehicle's electrical system that the door is securely closed. This allows for the functions of interior lights turning off, power windows and locks activating, and alarm systems arming.