Is there any explanation for how Barclay managed to graduate?
Every single episode he's in is like a case study.
If we're to believe Jake's comments in "Nor the Battle for the Strong," they're required to undergo a psychological profile during their training. Perhaps the issue is not whether an officer has a behavioral problem but whether the problem in question is treatable. Barclay may have carried a diagnosis and been treated prior to his coming aboard Enterprise
. That wouldn't explain why things changed once he was working for LaForge, but it may be why he was still in the service.