Isn't it true that when Cockpit staff wish to leave a none Cockpit staff on the outside have to go up to the door and stand guard as they open the door?
On flights I've been on recently, they declared a fasten-seatbelts-and-stay-seated order in the cabin when one of the pilots stepped out to use the restroom. There was also a flight attendant standing guard outside.