Parshas Bo tells us of the final three of the ten plagues that God inflicted upon the Egyptians before the exodus of the Jewish people from Egypt. The second from last plague was the plague of darkness, in which the entire land of Egypt experienced a supernatural darkness.
In a famous medrash, the Sages tell us that in addition to functioning as a punishment for the Egyptians, the plague of darkness also served to hide an event that God did not wish the Egyptians to witness. The medrash states (Shemos Raba 14:3, also see Tanchuma, Va'era 14, and Tana D'Vei Eliyahu 7):
Why did He bring darkness upon them? Blessed be the Name of the Holy One, blessed is He, for there is no favoritism before Him, Who delves deep into the [human] mind and examines [their] thoughts: For there were sinners (פושעים, Rashi here has רשעים, "wicked people") in Israel who had patrons among the Egyptians, and they had wealth and honor there, and they did not wish to leave. God said, "If I bring a plague upon [these sinful Jews] openly and they die, the Egyptians will say, 'The same thing that is happening to us is also happening to them!'" Therefore He brought the darkness upon the Egyptians for three days, so that [the Jews] would be able to bury their dead, and their enemies would not see.
There were Jews who were comfortable in Egypt and did not want to leave. The Sages do not accuse these people of any kind of sinful behavior, whether towards God or to their fellow men. Their entire wickedness is summed up in the fact that they did not wish to leave Egypt!
Moreover, we know that there were some genuinely wicked Jews who did leave Egypt together with their fellow Jews, the best known examples being the famous troublemakers, Dathan and Abiram. And the Jewish people as a whole were far from perfect. The Sages tell us that when God drowned the Egyptians at the Red Sea, the angels challenged the Divine Justice in drowning the Egyptians and not drowning the children of Israel, famously declaring, "הללו עובדי עבודה זרה והללו עובדי עבודה זרה" - "These are idol worshipers and those are idol worshipers!"
The implication of this medrash is that the issue was not that these particular Jews were exceptionally sinful, but rather that they were sinful in a very specific way, one which made it impossible for them to live to see the redemption of their people from Egypt. This was the simple fact that, regardless of any other virtues they may have possessed, these Jews wanted to stay in Egypt. They were quite comfortable in Egypt, and they saw no reason to leave!
As Jews, we have an obligation to see ourselves as part of a larger unit, the Jewish people, to which we are intrinsically connected. Our connection to God as individuals cannot be distinguished from our connection to the Jewish people as a whole. We can never simply go our own way, as if the fate of our fellow Jews means no more than that of any other random group of people.
One of the most famous teachings of the great Talmudic sage, Hillel, was (Avos 2:4), "אל תפרוש מן הצבור" - "Do not separate from the community." The commentaries explain that when the community is suffering, you have an obligation to bear the burden and suffer together with the community, even if the problem does not directly affect you. The Talmud (Taanis 11a) says that one who separates from the community when it is suffering will not merit to see the community's deliverance. This is precisely what happened to these Jews who did not wish to leave Egypt!
Not every sin requires actively violating an explicit prohibition. Indeed, as we see in this case, it is possible that one could be considered a sinful and wicked person even without doing a single forbidden or even improper act. Simply having the wrong mental attitude can be enough, if that improper attitude touches upon fundamental aspects of one's relationship with God and man.
This concept can also help us understand why it is that certain sins which seem to be relatively minor are sometimes given far more significance than others which would seem to be far more severe. One classic example is the case of a Jewish man sinning with a non-Jewish woman. Technically speaking, there is a debate if this is a Biblical or Rabbinical prohibition. And even if it is a Biblical prohibition, it clearly does not qualify for the severe penalty of kareis (spiritual excision) that we find by many other prohibited relationships. Yet, this is actually one of the most severe sins a Jew can commit! As the prophet Malachi said (2:11-12):
Judah has been treacherous, and an abomination has been done in Israel and in Jerusalem; for Judah has desecrated the holiness of God, which He loves, and has married the daughter of a foreign god. May God cut off (kareis) from the man that does this any living child from the tents of Jacob, and anyone that might bring forth an offering to the God of Hosts.
The prophet applies the penalty of kareis to an act that, according to many authorities, is not even a Biblical prohibition! Indeed, the Sefer Mitzvos HaGadol (R' Moses of Coucy, 13th century) writes (Lavin #112) that, in certain regards, the kareis described by the prophet is actually more severe than that of any other sexual sin.
The Talmud (Eruvin 19a) states (in a somewhat obscure passage) that, in the afterlife, when a Jew is condemned to punishment in Gehinom, the patriarch Abraham comes and takes him out, "except for a Jew that has had relations with a non-Jewish woman, for his foreskin is pulled forward and he is not recognized" as a Jew. Here we see that a Jew who commits this, technically "minor" sin, is said to have lost his circumcision, the sign of the Jewish covenant with God!
This brings us back to our original topic. Our relationship with God cannot be separated from our relationship with the Jewish people. This is the nature of the Jewish people, we are His people, and He is our God. It is that relationship with God that makes us a nation, and it is as a nation that we have that relationship with God. When we cut ourselves off from the Jewish people, we are cutting ourselves off from God. As Jews, we have a moral and spiritual obligation, unlike that found in any other nation, to remain loyal to our people, both as individuals and as a group. We bear our burdens together, we share in the suffering of our fellows Jews, no matter where they are or how different they may seem, and, ultimately, we will all experience the joy of the final redemption together, as one people.