I think what lawyers say isn't always meant to be a good defence, if that makes sense. Often it's more like an explanation because there isn't a good defence available. It's the job of the lawyer to present every client as sympathetically as possible, so that will include the ones that really are unsympathetic.
I am sure there is in many cases a connection between people like this being loners and the types of offences. Probably in both directions, many people who have social issues have a number of them, they are difficult to be with, and may have poor boundaries. Isolation as a result of that can also cause more problems.
In some of these cases I think its difficult for judges to make a good decision. Putting a guy like this in jail is not likely to improve things much, he will be out soon enough having lost his job, becoming more isolated, and being in contact with very dodgy types. It may be that the best approach would be to have someone like this working, not living with other questionable people, but under some sort of real supervision. That sort of situation isn't easy to create though and the judge can only work with the options available.