Anyone remember that polish/russian flight that crashed. VIP in cockpit then and it has raised many questions and accusations. A while back there was that russian flight where the pilots kid turned off the A/P when no one was driving. Clearly in some situations it increases risk. Easier to make a simple rule that denies access to all than write down all the exceptions.
Gee, I wonder how I managed to have visitors to the flight deck for the first 25 years of my career without any mishaps - in fact, on many occasions they helped keep me awake on night flights - maybe a benefit rather than a hazard?