I have a feeling that the "sweep" here is a chimney sweep - the guy who cleans out your chimney. Extend this to mean that if you play (fight) with dirty people, you'll get dirty. And 'dirty' can mean dishonest, unsavory, etc.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.