Who knows what was in this kid's head?
There was a time when the crew might have welcomed him into the cockpit during a non-busy period, like in cruise and they might have even welcomed him into a jumpseat, before 911.
I recall a vacation trip back in 2000 when the captain invited my two then young sons into the cockpit of his DC-9 on boarding and even allowed them to sit in the crew seats.
Most crews love flying and welcome those with an interest in it.
Security paranoia has changed all of that.