In this chapter, Paul calls out the Corinthians’ litigious ways and to kick their unhealthy habits. Apparently, they were often running to the secular courts to sort out their conflicts rather than dealing with in the community of faith. He is telling them they’re going about it wrong, because the saints will judge the angels. They should be capable of dealing with non-spiritual matters within their fellowship without dragging it to court.
At this point, it should be noted that in no way should these scriptures be used to justify church coverups of abuse. Most modern churches can and do comply within the legal structures of local legal accountability. In fact, they should hold themselves to the highest standards when protecting the vulnerable. The context that Paul is using is here is business dealings between congregants using the Roman courts to gain financial dominance while dragging the fellowship through the mud.
Paul reminds them that the unrighteous have no inheritance in the kingdom. He lists out again those whose actions are outside of faith including the sexually immoral, idolators, male prostitutes or men who use male prostitutes, thieves, covetous, drunkards, revilers, or swindlers. That’s quite a list and Paul wants the believers to live righteous lives. How people in the church act matters because they are redeemed by Jesus and his sacrifice.
He repeats the phrase all things are lawful, but not all things are helpful. He does not want them to be dominated by their physical needs. He talks about how food is a necessity for the body, but not eternal. Paul describes how the body is a temple of the Lord, so we should not use it to sin against ourselves and one another. Since believers are carrying the spirit of Christ within them, they should not be doing bad things physically. We need to glorify God with our bodies.

Don’t trash your temple.