Paul calls on Timothy to protect the church from false teachers and teaching. In order to do that he must be grounded in the truth himself. Godliness is what is eternal, and that is what he needs to teach the church. He is to be an example in speech, conduct, love, faithfulness, and purity. His good example and perseverance will attest to his salvation, and cause others to emulate him.
Unfortunately, some will indeed be deceived by false teaching, deceiving spirits, and demonic teachings. It’s very easy to think that Paul is talking about issues in his day and time, like some promoting celibacy or enforcing dietary laws. However, isn’t it possible that God is using examples that Paul would understand in order to convey ideas that would still make sense later? We certainly see the concept of marriage (particularly traditional marriage) being attacked in our time. And we see all kinds of suggestions regarding what we should and shouldn’t eat (as it relates to the “salvation” of the planet). Perhaps the Spirit was very particular in having Paul convey these ideas. They most certainly were problems for the church then, but they are presented in such a way that we can see how we could indeed be living in the later times ourselves.