About one hour after the takeoff, when I went to check my wife and kids, one of my daughters needed a restroom but the isle was blocked by the service cart so she could not use the lavatory for the economy class at the back of the plane and I decided to take her to the first class. However, the flight attendant told me that we must return to our seats immediately because "the pilot is coming out". We had nothing to do but obey the instructions and go back to our seats, while two flight attendants were standing between the first class cabin and the small service space that separates the cockpit door from the rest of the plane. I guess there is security procedure that requires two flight attendants forcing all passengers to sit down and watching them while one of the pilots is coming out to the restroom...
Although the cockpit doors on all US commercial airplanes were reinforced after 9/11, there are situations like this during the flight -- especially if it is relatively long one -- when bulletproof cockpit door is simply unlocked. Just a few feet separate first row of the first class seats from the cockpit door. Someone could just jump from the closest seat right at the moment when the door is unlocked and enter the cockpit. I am assuming that bigger planes have the lavatory inside the cockpit as well as the distance between the passengers’ seats and the cockpit door is much longer there so the pilots may have enough time to lock the door if something is going wrong. However, it looks like small airplanes still aren’t so safe.