This feature protects you from locking your key in the vehicle when the key is in the ignition and a door is open.
If the driver side power 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.
If the passenger side power 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 passenger door will unlock.