Consider this event during the time Jesus dwelt among us as a man:
"And when he was come out of the ship, immediately there met him out of the tombs a man with an unclean spirit,
Who had his dwelling among the tombs; and no man could bind him, no, not with chains:
Because that he had been often bound with fetters and chains, and the chains had been plucked asunder by him, and the fetters broken in pieces: neither could any man tame him.
And always, night and day, he was in the mountains, and in the tombs, crying, and cutting himself with stones.
But when he saw Jesus afar off, he ran and worshipped him,
And cried with a loud voice, and said, What have I to do with thee, Jesus, thou Son of the most high God? I adjure thee by God, that thou torment me not.
For he said unto him, Come out of the man, thou unclean spirit.
And he asked him, What is thy name? And he answered, saying, My name is Legion: for we are many.
And he besought him much that he would not send them away out of the country.
Now there was there nigh unto the mountains a great herd of swine feeding.
And all the devils besought him, saying, Send us into the swine, that we may enter into them.
And forthwith Jesus gave them leave. And the unclean spirits went out, and entered into the swine: and the herd ran violently down a steep place into the sea, (they were about two thousand;) and were choked in the sea.
And they that fed the swine fled, and told it in the city, and in the country. And they went out to see what it was that was done.
And they come to Jesus, and see him that was possessed with the devil, and had the legion, sitting, and clothed, and in his right mind: and they were afraid" Mark 5:2-15
Consider that the man with the unclean spirit, or legion of spirits, is you or me or the other guy before we met Jesus. Jesus was the healer, the One who commanded the unclean spirits to leave the man [us] but he [Jesus] was also the swine who received into themselves all of those unclean spirits and ran off the cliff to their final deaths. No more unclean spirits to bother us but the swine had to die to accomplish that. We are then that man, cleaned up and clothed properly and in our right mind after Jesus did his work...
So then Jesus lowered himself to effectively become a pig and then take on himself all of our garbage and killed himself [allowed himself to be killed] so that the man [you or me or the other guy] could sit then clothes and in our right minds.
Why did Jesus come back from the dead? Part of the pathway. Why did the man without the unclean spirit sit up clothed and in his right mind?
Before Jesus took on our sin, he did not need to die and be resurrected because he was not an unclean beast like all of us were. Jesus alone was clean [without sin]. He did take on our sin so that as a pig he could kill them all [those unclean spirits and beasts] directing them to run off that cliff and die. When the garbage was gone from Him, Jesus could Live again. When the garbage is gone from us [Jesus took it] we can for the first time ever [we were walking dead people before we met Jesus] we could have Life. We were born again because our first birth was to dead people and we had no real Life in us.
Even though it was unnecessary for Jesus personally... the whole thing of his death, burial and resurrection opened the Way and provided the means and example for us to follow:
Follow me...!
"And he saith unto them, Follow me, and I will make you fishers of men" Matt 4:19