The Corinthian church had a wrong understanding of earthly vs eternal things. As a result, their view of marriage was skewed and it was leading to a significant area of sin in their community. Paul wrote to address and correct their way of thinking and acting in relation to their marriages.
“To the married I give this charge (not I, but the Lord): the wife should not separate from her husband (but if she does, she should remain unmarried or else be reconciled to her husband), and the husband should not divorce his wife.” 1 Corinthians 7:10-11