It always amazes me how many assumptions are made...
It may be that the Pilot did not have the correct code to enter (there could be a variety of reasons for this scenario).
It may be that the door lock/keypad malfunctioned and/or had a history of malfunction.
If may be that the PF had some kind of medical emergency outside of being a psycho or being a terrorist.
Plus a plethora of other unlikely scenarios...
In an investigation you should not be seduced by the most likely explanation. It is always tempting to discount unlikely events but it is almost always unlikely events or a series of unlikely events that precipitates disaster.