The Christian meaning of life/Purifying suffering

1 Corinthians 5:1-5
As we read in Saint Paul's first letter to the Corinthians, there can be a type of purifying suffering due to one's sins which serves to obtain "salvation on the day of the Lord":

1 It is actually reported that there is sexual immorality among you, and of a kind that even pagans do not tolerate: A man is sleeping with his father’s wife. 2 And you are proud! Shouldn’t you rather have gone into mourning and have put out of your fellowship the man who has been doing this? 3 For my part, even though I am not physically present, I am with you in spirit. As one who is present with you in this way, I have already passed judgment in the name of our Lord Jesus on the one who has been doing this. 4 So when you are assembled and I am with you in spirit, and the power of our Lord Jesus is present, 5 hand this man over to Satan for the destruction of the flesh, so that his spirit may be saved on the day of the Lord.

Dark Night of St. John of the Cross
Then there is a type of purifying suffering as passive personal purification, which prepares the soul for perfect union with God...Such purification ... appears necessary to remove the defects of the proficient (those who are on the path to perfection) of which Saint John of the Cross speaks in the Dark Night:

CHAPTER 9 Where we talk about the signs by which we recognize that the spiritual person is in this night or purification of the senses. 1. This dryness can often derive not from the night or purification of the senses, but from sins, imperfections, weaknesses, lukewarmness, or from some bad mood or physical ailment. For this reason I will indicate here some signs to discern whether this aridity has its origin in the purification of the senses or one of the defects listed above. In this regard there are three main signs. 2. The first is the absence of taste and consolation in the things of God and in anything created. In fact, when God introduces the soul into this dark night to lead it to aridity and purify it from sensitive appetite, he does not allow it to feel consolation in anything. ... 3. The second sign that confirms the presence of purification of the senses consists in habitually remembering God with a concern and attention that causes pain; we worry about not serving God, or rather about regressing, because we no longer enjoy divine things. This shows that disgust and aridity do not come from weakness and lukewarmness. ... 8. The third sign to recognize the purification of the senses is the inability on the part of the soul to meditate or speak using the imagination, as he did before, no matter how much effort he makes. Now God begins to communicate himself to the soul not through the senses, as previously; not through the discursive activity that composes and orders cognitions; but through the pure spirit, in which reasoning does not develop.