how can the person be saved in the day of the Lord Jesus Christ by delivering
such person to Satan for the destruction of the flesh?
We see in 1 Corinthians 5:5 that Paul calls for the sinners to be handed to Satan for the destruction of his flesh so that his spirit can be saved. The devil is not supposed to save souls, and it seems anomalous that Paul would expect the devil to destroy a person's flesh but save his soul. This exhortation may well involve excommunication or expulsion from the church, but that still does not explain how this would save the person's soul.
This passage uses is the Greek word for 'Satan', not 'devil', so it is useful to look at pre-Christian Jewish or proto-Christian (pre-gospel) usage of the word Satan, and avoid reading into the passage any meaning that may have arisen in later times. While Christianity has come to equate Satan with the devil, rabbinic Judaism regards Satan as the loyal servant of God, tasked to test the righteousness of the faithful. Consistent with this view, in the first New Testament gospel to be written, Mark, Satan tempts Jesus in the wilderness (Mark 1:13), but does not seek to do evil; when Jesus rebukes Peter and calls him Satan (Mark 8:33), he is speaking of Peter as offering temptation, but not as an evil person:
But when he had turned about and looked on his disciples, he rebuked Peter, saying, Get thee behind me, Satan: for thou savourest not the things that be of God, but the things that be of men.
The Book of Job gives us a good portrayal of the kind of Satan that fits the passage in 1 Corinthians 5:5. It describes Satan as doing God's bidding, going to and fro on earth:
Job 1:6-7: Now there was a day when the sons of God came to present themselves before the LORD, and Satan came also among them. And the LORD said unto Satan, Whence comest thou? Then Satan answered the LORD, and said, From going to and fro in the earth, and from walking up and down in it.
God asks Satan whether he has considered Job, an upright man:
And the LORD said unto Satan, Hast thou considered my servant Job, that there is none like him in the earth, a perfect and an upright man, one that feareth God, and escheweth evil?
Satan is sent to test Job, and causes great harm to his family, in an attempt to have Job curse God and thereby demonstrate his unrighteousness. When this fails, Satan causes physical damage to Job's flesh, which ultimately results in him (and the reader) realising his sin of pride and repenting.
This is what Paul seems to be talking about - let Satan test and punish the Corinthian sinners in the flesh and, by their repentance, save their souls. If Paul did not actually have the Book of Job in mind, then he should at least have been aware of the tradition of which the Book of Job forms a part.