With the bullet proof door, dead lock etc, if the other pilot decided that they wanted to commit suicide or an act of terrorism, they could easily lock you out of the cockpit. I have the utmost faith in my fellow pilot but I like to cover for unexpected situations (in my mind at least) and being deadlocked outside is one that I can't...
Isn't that one of the reasons why another member of the aircraft's crew, such as cabin crew, sit in the cockpit when one of the flight crew leaves?
Another reason just in case the remaining pilot becomes incapacitated...