Pre-9/11 cockpit visits were normal and commonplace - some airlines even encouraged them! Air Canda used to have a note in its in-flight magazine inviting passengers to visit the cockpit on long-haul flights, and if you took them up on their invitation you were given a special commemorative card signed by the pilot (I've still got one somewhere...)
The days of open invitations to visit the cockpit will, of course, never return - but what security risk is there in inviting a known frequent flyer into the cockpit? Terrorist attacks take some time to plan, someone who is invited into the cockpit unexpectedly is not likely to be concealing a bomb or knife just on the off-chance that he invited into the cockpit