This passage of Scripture more than any other, except perhaps "Judge not that ye be not judged.", has been used to bring the trash of the world into the Churches, including trash music like rock, hip hop, and whatever.
There are basically two types of unsaved people in the world. Those who are self righteous and need not the Grace of God and those who believe their sin forbids them the Grace of God. These two types are best exemplified by the following parable of Jesus Christ:
Luke 18:10, 14
10. Two men went up into the temple to pray; the one a Pharisee, and the other a publican.
11. The Pharisee stood and prayed thus with himself, God, I thank thee, that I am not as other men are, extortioners, unjust, adulterers, or even as this publican.
12. I fast twice in the week, I give tithes of all that I possess.
13. And the publican, standing afar off, would not lift up so much as his eyes unto heaven, but smote upon his breast, saying, God be merciful to me a sinner.
14. I tell you, this man went down to his house justified rather than the other: for every one that exalteth himself shall be abased; and he that humbleth himself shall be exalted.
The Apostle Paul once referred to himself as the "Chief of Sinners" [1 Timothy 1:15] and as the least of the Apostles because he had persecuted the Church [1 Corinthians 15:9]. As Saul, the persecutor of the Church, he was:
Philippians 3:5,6
5. Circumcised the eighth day, of the stock of Israel, of the tribe of Benjamin, an Hebrew of the Hebrews; as touching the law, a Pharisee;
6. Concerning zeal, persecuting the church; touching the righteousness which is in the law, blameless.
From his background as a self righteous Pharisee to recognizing himself as the chief of sinners Paul was able to identify with the needs of the unsaved. I believe that is the message of the passage in the OP [1 Corinthians 9:19-23]. Paul did not become a drunk so that he could identify with drunks, sexually immoral so that he could identify with the sexually immoral, a liar so that he could identify with liars and so on. Yet because he understood both the attitude of the self righteous and the sinner he was able to present the Gospel of Jesus Christ.
There is an event in the life of Jesus Christ that vividly and beautifully demonstrates the difference between one who understands that he stands before God as a sinner and subject to the wrath of God and one who stands before God in his self righteousness. The Apostle Paul could identify with each of these people, both in need of the saving Grace of God.
Luke 7:36-50
36. And one of the Pharisees desired him that he would eat with him. And he went into the Pharisee’s house, and sat down to meat.
37. And, behold, a woman in the city, which was a sinner, when she knew that Jesus sat at meat in the Pharisee’s house, brought an alabaster box of ointment,
38. And stood at his feet behind him weeping, and began to wash his feet with tears, and did wipe them with the hairs of her head, and kissed his feet, and anointed them with the ointment.
39. Now when the Pharisee which had bidden him saw it, he spake within himself, saying, This man, if he were a prophet, would have known who and what manner of woman this is that toucheth him: for she is a sinner.
40 And Jesus answering said unto him, Simon, I have somewhat to say unto thee. And he saith, Master, say on.
41. There was a certain creditor which had two debtors: the one owed five hundred pence, and the other fifty.
42. And when they had nothing to pay, he frankly forgave them both. Tell me therefore, which of them will love him most?
43. Simon answered and said, I suppose that he, to whom he forgave most. And he said unto him, Thou hast rightly judged.
44. And he turned to the woman, and said unto Simon, Seest thou this woman? I entered into thine house, thou gavest me no water for my feet: but she hath washed my feet with tears, and wiped them with the hairs of her head.
45. Thou gavest me no kiss: but this woman since the time I came in hath not ceased to kiss my feet.
46. My head with oil thou didst not anoint: but this woman hath anointed my feet with ointment.
47. Wherefore I say unto thee, Her sins, which are many, are forgiven; for she loved much: but to whom little is forgiven, the same loveth little.
48.And he said unto her, Thy sins are forgiven.
49. And they that sat at meat with him began to say within themselves, Who is this that forgiveth sins also?
50. And he said to the woman, Thy faith hath saved thee; go in peace.