In my flight down to USH I went to use the restroom and the cockpit door was open and when the crew saw me they closed the door (there was an FA there chatting around)
thats very common imo, Pilots use the bathroom too
The pilots and an GA was sitting there and shmoozing with the door open, if I wouldn't have passed then it would have stay open longer. When pilots usually exit an FA will block the path and they close the door right behind them and don't keep it open.