On the first Friday after Hashem gave Bnei Yisroel the manna, they noticed that everyone had gathered twice as much as they had gathered on previous days. Upon their inquiry as to the reason behind this phenomenon, Moshe informed them that no manna would fall on Shabbos, and therefore, they had received a double portion on Friday. Nevertheless, on Shabbos morning there were those who left their tents to gather manna. In response to this incident, Hashem tells Moshe, "Until when will you (plural) refrain from performing my commandments and Torah. See that Hashem has given you the Shabbos [and] therefore, on Friday he gives you a double portion of bread - every man should stay put; no man should leave his place on the seventh day" (Shemos 16, 28-29).
Rashi explains that despite the fact that Moshe was in no way involved in the above incident, he was blamed along with the evildoers. "As people say, 'The cabbage gets destroyed along with the weeds' i.e. the righteous get shamed along with the wicked." Why is it that the righteous have to suffer because of the sins of the wicked? Rav Wolbe (Shiurei Chumash) explains, that in reality there is an element of fault to be found in the righteous as well. Chazal tell us that every Jew is responsible for every other Jew. The entire nation is interconnected, and therefore everyone has the ability to prevent others from sinning. If the majority fastidiously refrains from any given aveirah, it creates a "security fence" that does not allow others to be derelict in this area. Hence, a breach in an aveirah by anyone, demands that everyone perform some self introspection.
A case in point is the story of Achan in Tanach (Yehoshua 7). After conquering Yericho, the Jewish People consecrated all the belongings found inside the city. Nevertheless, Achan took a handful of valuables from the booty. Hashem told Yehoshua, "Yisroel sinned, they transgressed the covenant that I commanded them, they also took from the consecrated items and they have also stolen, and also denied it, and also placed it in their utensils." A simple reading of the pesukim would lead us to think that the majority of Bnei Yisroel had sinned terribly, when in reality it was a lone man who perpetrated the crime. So, why was it written in such a manner? The answer is the above idea. If a single person could commit a crime, then the rest of Bnei Yisroel were also somewhat to blame.
Sometimes, when hearing about another Jew's egregious act we think to ourselves, "How could he have done such a terrible thing?" However, our reaction should be different. We should turn the question around and ask ourselves, "Where have I gone wrong in this area?"