Contrary to what we had been led to believe, as well as shown in brief glimpses throughout the movie, Thomas (Vincent Kartheiser) was sexually abused by his own mother; Thomas's jailed-for-life dad, Joseph (Sam Bottoms) ,confessed to psychiatrist Michael Hunter (Andy Garcia) that this was the actual reason why we brutally beat his wife to death, witnessed by Thomas as a child.
However, this is not found out until shortly before the end of the movie, but it does explain why Thomas was reluctant to be touched by any woman, as Shelly (Linda Cardellini), Hunter’s daughter, tried to get intimate with him a couple of times. In a climactic confrontation, the truth gets disclosed, and Dr. Hunter even has to save Thomas from being runover by a train, as the boy tries to commit suicide by running into it.
In the end, we see Thomas formally commited at the mental institution; Dr. Hunter meets with him and they both decide to give each other a second chance to set things right.
Thanks Dr. Mat!