Lots of people have this question.
He willingly dies testifying against the sin within himself but in favor of the good within himself. This is explained by several NT writers. It is a mystical concept that argues that the gentile should be granted fellowship as if they were Jews. Whether you agree with that or not, that is what the death means.
Bible tells that the reason Jesus died is this:
For to this end Christ died, rose, and lived again, that he might be Lord of both the dead and the living.
Romans 14:9
And reason why he came on earth is this:
"The Spirit of the Lord is on me, Because he has anointed me to preach good news to the poor. He has sent me to heal the brokenhearted, To proclaim release to the captives, Recovering of sight to the blind, To deliver those who are crushed, And to proclaim the acceptable year of the Lord."
Luke 4:18-19
He said to them, "Let's go elsewhere into the next towns, that I may preach there also, because for this reason I came forth."
Mark 1:38