The purpose of death:
The purpose of death is to cleanse the soul and body of man from impurities. Initially, when man was first created, he was able to live forever. The concept of death was not initially planted into nature. This is because the man that was created by G-d was holy and had no reason to die. However, once man ate from the Tree of Knowledge and brought evil into the structure of his soul, he introduced the necessity of death in order for this evil to die with him. If he would now live forever, it would mean that evil would remain everlasting, and the purpose of the world’s creation would never be fulfilled. It is for this reason that after Adam and Chava ate from the Tree of Knowledge, they were expelled from Gan Eden as Hashem wanted to prevent them from eating from the Tree of Life, so that they could die and reach the goal of eradicating evil and making the world a dwelling place for G-d. Now, this necessity of death is not only applicable for Adam and Chava, but for all mankind thereafter, as Adam incorporated all the souls of mankind, and when he sinned, he caused them all to become tainted with Kelipa. It is for this reason that all people must eventually die, so the Kelipa that became attached to their souls becomes separated and refined. It is not possible for man to rid himself of this impurity through actions done during his lifetime, even if he is of most righteous nature, and only death can accomplish this ridding of the evil. Particularly, it is the punishment of Chibut Hakever which accomplishes the separation of the evil from the soul, as will be explained in 4G!
 See Arizal in Shaar Hagilgulim 23; Torah Or p. 5b Mamar “Vayomer Hashem Elokim Hen Adam….…”