In 1 Corinthians 5:5 a person from the church is delivered to Satan. How is this merciful?
To understand this passage look at it in the whole context:
1 Corinthians 5:1 It is actually reported that there is sexual immorality among you, and such sexual immorality as is not even named among the Gentiles — that a man has his father’s wife! 2 And you are puffed up, and have not rather mourned, that he who has done this deed might be taken away from among you. 3 For I indeed, as absent in body but present in spirit, have already judged (as though I were present) him who has so done this deed. 4 In the name of our Lord Jesus Christ, when you are gathered together, along with my spirit, with the power of our Lord Jesus Christ, 5 deliver such a one to Satan for the destruction of the flesh, that his spirit may be saved in the day of the Lord Jesus. 6 Your glorying is not good. Do you not know that a little leaven leavens the whole lump? 7 Therefore purge out the old leaven, that you may be a new lump, since you truly are unleavened. For indeed Christ, our Passover, was sacrificed for us. 8 Therefore let us keep the feast, not with old leaven, nor with the leaven of malice and wickedness, but with the unleavened bread of sincerity and truth. 9 I wrote to you in my epistle not to keep company with sexually immoral people.
There are several principles we can draw from this passage and two of these directly answer your question.
First, we as believers in Christ have been bought with a price and we are not our own (1 Corinthians 6:19-20). As believers, Satan no longer has any claim over us. The Bible tells us that he accuses us before God night and day, but he does not have any claim over us. We can submit ourselves to him by sinning, but we still belong to God. This point is driven home in the book of Job. Satan had to receive permission from God before he would attack Job’s body or even get inside the hedge of protection God had placed around him. The same is true for the believer today. Even a Christian in sin still belongs to God. In this circumstance the apostle Paul is referring to surrendering a person’s body to Satan for judgment. This would be done by lifting the person up to God in prayer. In this instance, the person was unwilling to repent so the church is taking the desperate measure of seeking physical surrender to Satan so the person would not face a worse fate.
This brings us to the second principle related to your question. The purpose of physical judgment is not to punish, but to lead them to repentance. God’s judgment against the sins of His children is always a tool to drive us back to His mercies. When Israel sinned, God sent judgment to break their hard hearts. Physical suffering is a minor loss compared to forfeiting our eternal reward. Because this believer in Corinth was pursuing Satan, God was now going to allow him to gain what he was pursuing. Temptation is always a trap. God protects us from the trap until we will accept nothing less than the bait. There are times when God allows us to fall into the trap so that we see it for what it is. It is a painful lesson, but when we are stubborn this is often the only way we can see the foolishness of our demands.
The purpose of this judgment against the body was for the person to come to repentance. After the judgment was carried out, Paul addresses the same situation in 2 Corinthians 2: 6 This punishment which was inflicted by the majority is sufficient for such a man, 7 so that, on the contrary, you ought rather to forgive and comfort him, lest perhaps such a one be swallowed up with too much sorrow. 8 Therefore I urge you to reaffirm your love to him.
As we can see, the purpose was not to ostracize the sinner, nor was it meant to destroy him. The only purpose of God’s chastisement is to correct our destructive behavior. When this man repented, the instruction was to restore and affirm love toward this person.
So the meaning of 1 Corinthians 5:5 is to take action to protect fellow believers from self-destructing and to prevent his behavior from influencing others. The person living a sinful lifestyle is removed from the fellowship of the church while they are practicing that lifestyle to protect the church and turned over to Satan for judgment to protect their soul and cause them to repent and return to God.