There is no reason not to allow cockpit visits other than as part of the "theatre of security' (theatre as it is there to show that you are doing something - even if it is pointless.
When I was a kid I used to spend a lot of time on planes and the cockpit visit was always a highlight of the flight (from plucking up the courage to ask the pretty hostess if it would be possible, to the time waiting for a response, to the time waiting until the captain sent someone to bring you up and the time spent in the cockpit being told how they fly the plane - this took up large amounts of otherwise dull flying time!).
I even got to stay in the cockpit once for a landing - which was, and still is, the highlight of my time in the air.
What I can say is that pilot recruitment is going to be hard in the coming years as kids no longer get the thrill of the cockpit visit pushing them into aviation (unless they live in the more civilised parts of the world where such things are still allowed).