From "Hollow Pursuits", we have the following exchange between Picard, Riker, and LaForge concerning Barclay's performance:
PICARD: There's every indication he's served competently in Starfleet for years. His ratings aboard the Zhukov were satisfactory. In fact I recall Captain Gleason speaking quite highly of him before his transfer.
RIKER: In retrospect, I wonder if Captain Gleason wasn't buttering our bread a little. He knew we were looking for a diagnostic engineer. I've examined Barclay's psychological profile. He's a history of seclusive tendencies. It was noted at the Academy more than once.
PICARD: And yet he chose this way of life. He has made the same commitment to Starfleet that we all have. It's easy to transfer a problem to someone else. Too easy.
LAFORGE: Captain, it's not like I haven't tried.
PICARD: Try harder, Geordi. He's a member of your team. Try to find some way to help him to make a positive contribution. Get to know the man better. Make him your best friend.
So here are the some things in Barclay's favour:
- Barclay is a diagnostic engineer
- The Enterprise needed a diagnostic engineer specifically
- Captain Gleason gave him a good reference (for whatever reason)
- The only notes in his psychological profile prior to "Hollow Pursuits" were reclusive tendencies; these tendencies may actually have helped him to hide his more serious neuroses from previous crewmates
It's true that Picard would have reviewed Barclay's history prior to approving his transfer to the Enterprise, but Picard has permitted crew members with even more worrying records to serve — in particular Ensign Sito Jaxa, who conspired with Nick Locarno and Wesley Crusher to conceal actions that led directly to the death of a fellow cadet.
Clearly, Picard believes in giving people the benefit of the doubt.