There are lots of people with extreme social anxiety who can make it through because they're smart enough to pass all the tests and finish their assignments. He probably didn't become as detached as he was and addicted to the holodeck until he got to the Enterprise.
Psychological health and screening is supposed to have progressed beyond what we have in 2018! And the Enterprise is a small group, only 1000 people. It's usually harder for someone to fade into isolation in such a small living group.