Search for posts by "QSilver7".....I think this is a factory feature in 1996-98 years (not sure, check it).
Once the door is locked from outside, a thief who breaks the glass will not be able to open the door: good and bad.
The good part: anti-theft.
The bad part:....one day I left my 16 y.o. daughter in the car, locked the door to go to the shop. She moved inside the car (reading a book), the alarm went off (motion sensor), she could not even open the door to get out! Luckily I was nearby and open the door for her.
So this could be a safety issue during an accident too.
So when I drive my E39, I do not lock the doors just in case.