The question of why people choose to commit crimes—often in the face of severe consequences—is at the root of criminal psychology, a branch of study that focuses on the intentions and behaviors of those who plan and carry out criminal acts. On the other hand, psychology itself has, over the years, engendered significant changes in how legal experts think about the crime and the law, as well as changes in how the mentally ill are treated by the criminal justice system.