If the vehicle has power door locks, this feature protects you from locking the key in the vehicle when the key is in the ignition and a door is open.
If the power door lock switch is pressed when a door is open and the key is in the ignition, all of the doors will lock and then the driver door will unlock.