The answer to the above question is that the soul is the center of reward and punishment, happiness and agony, pleasure and pain. Hence, if the body suffers a pain, it is because of the soul to which it belongs. In case the soul is taken away from the body, there is left nothing except the flesh which, if cut into pieces, will not involve or entail any pain. Why? That is because the body is souless. Therefore, when it comes to implementing justice, punishing anyone of a human being's bodies would not be against justice even though he may not have committed a crime with it. That is because the body is like a clothe put on a criminal who is supposed to be flogged.
This spurious argument has been raised by those who deny physical resurrection in the hereafter. They say it has been scientifically proven that the cells of man's body constantly change from the time of conception until old age. Thus, within a time period of eight years the entire cells change as a result of which man acquires a new body with complete new cells. Therefore, man's body changes several times during his lifetime. Now the question is: Which one of these bodies are resurrected and brought to justice on the Day of Judgment? Which one is punished and which one is bestowed with divine blessings in a way such that it is not opposed to God's justice.
The answer to the above question is that the soul is the center of reward and punishment, happiness and agony. Hence, if the body suffers a pain, it is because of the soul to which it belongs. If the soul is taken away from the body, there is left nothing except the flesh which, if cut into pieces, will not suffer any pain. Why? That is because the body is soulless. Also, the pleasures are related to soul. If the eyes enjoy seeing a scene and if the ears enjoy listening to a song or the tongue enjoys eating a delicious food causing the nerve system to feel pleasure and delight, it is because of the soul which they belong to. If the soul is taken away from the body, the body will not be any different from a piece of iron. Therefore, when it comes to implementing justice, punishing anyone of a human being's bodies would be not be against justice even though he may not have committed a crime with it. That is because the body is like a clothe put on a criminal who is going to be flogged. That is because flogging a naked body has certain consequences. It is for the same reason that a dress is put on the body of the criminal and then he is flogged. Flogging on the clothe of the criminal is not considered against justice. Of course, this example should not lead you to think that the resurrection of man is spiritual and he is not resurrected physically. The fact is that the body and soul are resurrected together but it is in fact the soul which is either rewarded or punished. A part of the punishments and rewards are not possible unless the soul is enveloped by the body. Thus, the soul should be resurrected with the elemental corpus. For example, a man deliberately commits a murder at a young age. The penalty for this crime is capital punishment but the man escapes and he remains at large until he is found and arrested in his fifties. If at this time the man is punished to death for the crime he has committed, it is not an unjust action; because it is a man's soul that constitutes his personality and reality. The soul does not change throughout a person's life; it remains intact and perfectly the same even though his body cells may have changed several times and even if he may have had different bodies during all this period of time.
In other words, man's soul constitutes his identity, reality and personality. The world has been created for it and the resurrection will also be held for it. He also created the world and the Hereafter will be held. The thing is that the soul is perfected through the body and it acquires knowledge and insight with the help of the body. If the body were not to assist the soul, man's soul would not get perfected. Also, in the eternal abode, man gets pain or pleasure through the body. Therefore, the body is a means for the soul. If any body is used as a means, it is not but fairness and justice., 
 - Mulla Sadra, Mabd'a wa Me'ad (The Source and Resurrection), Ahmad bin Muhammad Al-Hussaini Ardakani, Abdullah Noorani, pg. 433-436, Tehran University Press, 1362; Subhani, Ja'afar, Elahiyat wa Ma'aref Islami, pg. 290 – 297, Shafaq Publications, Qom, 2nd edition, 1379.
 - In this regard, see a relevant article: Question 4101 (site: 4362).