Why he chose to go to jail

At the docks he could've just left and come out clean but instead chose to join the shootout to face two options: die or go to prison. Why?

Also how did he even expect the police ambush?

Didn't ruin the movie for me though. A solid 7/10.


I was thinking the exact same thing. He could have turned around. He had nothing to gain and everything to lose. Weird.