"The goal of this command is love, which comes from a pure heart and a good conscience and a sincere faith." NIV translation
Paul is telling Timothy that the reason for him dealing with the false teachers is love. Love for those that are being led astray in their faith and those that are leading them astray. This love comes from a genuine faith in the finished work of Jesus Christ.
"Some have wandered away from these and turned to meaningless talk. They want to be teachers of the law, but they do not know what they are talking about or what they so confidently affirm." NIV translation
These false teachers have walked away from grace by trying to add works (the law) to it. They are confident of what they believe but they are ignorant of the purpose and application of the law.
The same is true of many false teachers today as many sincerely believe what they teach but they are trying to teach without having the understanding that comes from God through the Holy Spirit.
"We know that the law is good if one uses it properly." NIV translation
How does one use the law properly? First, you have to understand who the law is for and that is those who have not accepted Jesus Christ as their Lord and Savior (the unsaved or lost). Then, you have to understand the purpose of the law which is to get people to the point where they realize that they cannot repair their relationship with God through their own efforts. Once you accept the grace of God through Jesus Christ, the law does not apply to you as Jesus nailed it to the cross.
"We also know that the law is made not for the righteous but for lawbreakers and rebels, the ungodly and sinful, the unholy and irreligious; for those who kill their fathers or mothers, for murderers, for adulterers and perverts, for slave traders and liars and perjurers - and for whatever else is contrary to the sound doctrine" NIV translation
We see that the law is meant for sinners and we must remember that the purpose is to bring them to the point of understanding that they cannot keep the law on their own. Some have taken this list to sort of create a sin rating system like one is worse that the other but they forget the "whatever else" part. ALL sin separates us from God but the good news is that Jesus paid for ALL of our sins.