There’s a book written about it in greater detail, called the Psychopath Test by Jon Ronson. Basically it suggests that we could all be deemed mentally ill based on the classifications in the DSM.
If it is indeed true that faking mental illness to get out of a prison sentence is something a psychopath would do, then the doctor's diagnosis was correct, and he did belong in a mental institution.
https://www.youtube.com/watch?v=xYemnKEKx0c