“Do not be deceived: ‘Bad company corrupts good morals’” (1 Corinthians 15:33).
In the context from which Paul writes, the bad company is comprised of those within the church that do not believe in the bodily resurrection of the dead. The apostle sees a corresponding relationship between beliefs and behavior. Bad doctrine=bad behavior; good beliefs=good behavior. In a broader context, if you run with dogs you will get fleas.