Why?
To serve as a substitute for you, me, and everyone who will accept His gift of giving His life
as a substitute for you, me, and anyone who will accept His gift of his sinless life
which pays the death penalty for our sins.
For a brief but better explanation
HERE'S THE LINK TO Nailed to the Cross