The immorality of Corinth had seeped into the church. Some of the Christians in Corinth had either reverted to the way they lived before they were saved, or some had not been saved at all. Paul's words here were meant to be a wakeup call for them. His goal is to remind them of what Jesus had done in their lives so they would turn back to Jesus. Despite saying that the unrighteous won't inherit the KoG, this passage is not a hopeless passage. In fact, this is an incredibly hopeful passage. In this passage we see that Jesus turns sinners into saints. How does this happen? Or perhaps a better question is, what do I do so that I can go from being a sinner to a saint?