It is a brave and sometimes difficult thing to handle the God-given gift of sexuality well. When it does not go well, then the Church must also be brave and us it's power of reconciliation. If that doesn't work, then there are powers of discipline to best care for the individual that needs it.
Paul corrects the individual in this situation, but he also corrects the response of the church. When someone arrogantly oversteps the Truths of the Lord, the correct response is not to do nothing. Here, after all else fails, the unrepentant person of sexual immorality, greed, idolatry, drunkenness or swindling, should be removed from fellowship.
Remember, fellowship is a wonderful thing. Here we see it's power used for the hopeful good of the wayward.
I hope you are operating in sexual morality. If not, then stop. Don't make the power of fellowship be used in this way to discipline you. Sign up at bewithme.us.