Answer:
Deterrence.
Step-by-step explanation:
Deterrence refers to the idea that the threat of punishment will discourage possible criminals from breaking the law. In order for deterrence to work, it must be both credible and uninviting enough, so would-be criminals consider the cost of breaking the law much higher than the cost of respecting it.
In this case, Trevor has already been punished by a previous crime. However, the assaults and murderers he witnessed during his ten years in a maximum security prison will act a deterrent. In order to avoid landing in prison again and having to live fearing for his life everyday, Trevor will be determined to never again commit a crime. He considers the cost of landing in prison again to be much higher than respecting the law, so he's being deterred.