Samaritan has shown in the past that it could profile unstable people to do its bidding. And since we have absolutely no idea on the backstory of the kid, its plausible to assume that he had an unfortunate history with the system. Kinda like how folks get radicalized.