In this context, "bad company" refers to individuals who engage in negative or immoral actions. When someone surrounds themselves with such people, they are more likely to be influenced by their behavior and adopt similar attitudes and actions.
Conversely, "good morals" represent a person's ethical principles and values. The quote warns that associating with individuals who do not share or uphold these values can lead to their erosion or degradation.
Overall, this quote serves as a reminder of the importance of choosing one's companions wisely, as the company we keep can significantly influence our character and moral compass.