Paul continues to give advice about relationships by giving advice to slaves. The Roman Empire had many slaves, and obviously some had come to Christ. Paul is not speaking in favor of slavery, but giving advice to those who find themselves in that situation. He also warns Timothy not to be deceived by false teachers; instead he is to live a godly and contented life.
We are so used to people having rights, we find it difficult to understand Paul’s priorities when it comes to slaves. He wants them to work in a way that makes God look the best. We think about fairness for ourselves before we think about what is best from God’s perspective. God’s desires are more important than ours, but we don’t always see it that way.