That kept the cockpit door locked?
Electronics are not fail safe fail safe fail safe..........
The plane began the dive when the pilot was outside the cockpit. If there was an instrument malfunction and the plane was out of control, the last thing he's going to do is take his hands off the steering wheel (or whatever it is)and leave his seat to go back and unlock the door.........
Not saying a malfunction was the case but that would explain why the door remained locked.