Not as a legal court finding or anything like that. It is an old saying. "Guilt by association" is a warning to choose your friends wisely, and who you hang around with carefully, because you are ofterntimes judged by who you hang around with. Another old saying that means the same thing is, "If you lie down with dogs, chances are that you'll get up with fleas."