Our Gemara on Amud Beis tells us the source for the requirement of 10 men to create a minyan, which ultimately comes from the 12 Meraglim who were referred to as an עדה רעה an evil congregation. If you subtract the two virtuous spies, that being Calev and Yehoshua, you are left with ten.

There is a fascinating pattern that emerges. Often significant halachos of positive and meaningful import are learned out from less than ideal circumstances. Here, the concept of minyan comes from the spies. I am going to provide a few more examples:

  • The Biblical prohibition against hitting someone is derived from the verse in Devarim (25:3) instructing that Bais Din must be careful to not administer more than 39 lashes. The Talmud (Sanhedrin 85a) reasons a fortiori, if we are forbidden to overdo hitting one who is guilty and incurred lashes, surely we are forbidden to hit another innocent person altogether.
  • The Biblical source prohibiting cursing a Jew comes from the verse (Shemos 22:27) prohibiting cursing a leader. The frustration against a political figure especially leads a person to want to curse him and wish for his doom. But the law ultimately applies to all Jews (Chinuch 231).
  • The obligation to assist someone whose beast collapses under its load comes from the verse that discusses this happening to an enemy’s beast, but of course surely applies to a friend in the same situation (Shemos 23:5).
  • The rule that a first born receives a double inheritance is derived from verses (Devarim 21:17) that warn a father not to override the progenitor, even if he is the son of a wife who is hated. Of course, this rule also applies in the case of a beloved son. 
  • Additionally, we find an entire category of Halachos about general purity and sanctity for prayer in all places derived from the Biblical obligations to “keep your camp holy” during a battle, as described in Berachos (25b).
  • There is an halakhic dictum that the need for peace in the home supersedes many other halakhic considerations, such as we find that Shabbos lights are prioritized over Chanuka lights (Shulkhan Arukh 363:3), or a rabbi sacrifices his own honor in order to promote marital harmony, as described in Nedarim 66b. The source of this comes from the ordeal of the Sotah, who drinks a mixture that is composed from ink of a section of the Torah which has God’s name in it and is scraped off and erased into the water (Shabbos 116a). If we can erase God’s name for shlom bayis, surely other less serious matters do not take precedence of shlom bayis.
  • The ways to create the bonds of marriage are derived from the Torah’s description of someone who marries and then decides to divorce, see Devarim (24:1 and Kiddushin 4b-5a). 
  • The obligation of a man to give his wife extra attention during the first year of marriage is derived from the verse that describes a military exemption for a newly wed. Devarim 24:5: “⁦When a man has taken a bride, he shall not go out with the army or be assigned to it for any purpose; he shall be exempt one year for the sake of his household, to give happiness to the woman he has married.” The regular marriage obligations of the first year emerge from the Torah discussing warfare.
  • The Biblical obligations of a husband to a wife to provide intimacy, clothing and food are learned out from an exceptional case. Should a man take a young maid servant for a wife, he is forbidden to deprive her of those basic rights even if he takes another wife. The Torah protects the rights of a young woman who might be treated as secondary to a woman that comes from a more respected lineage. However, this is the sole source for all Biblical marital obligations, as described in Shemos 21:10 and Kesuvos 47b.

I believe there are two hidden messages within this Torah pattern. The simple idea is that the good can emerge from the bad. All situations in life provide opportunities to learn from. However I believe there is also a deeper message. The Torah discusses rules and boundaries only in extreme situations because you are expected to use common sense and compassion to guide you in the non-extremes. In other words, the message is, I don’t need to tell you to focus on your wife during the first year of marriage. I’ll just remind you in a circumstance where you might be tempted to set a different priority, such as during a war. Or, I don't need to tell you that you have basic obligations to provide for your wife. I’ll just remind you that even a woman of low status and lineage must be treated the same.

This approach is seen in the verse prohibiting one from mistreating a widow or an orphan (Shemos 22:21). Rashi quotes the Mekhilta as follows: “⁦כל אלמנה ויתום לא תענון YOU SHALL NOT AFFLICT ANY WIDOW, OR FATHERLESS CHILD — That is also the law regarding any person, but Scripture is speaking of what usually happens and therefore mentions these in particular, for they are feeble in defensive power (i. e. they have no one to protect them) and it is a frequent occurrence for people to afflict them (Mekhilta d'Rabbi Yishmael 22:21).”  Once again, the Torah doesn’t need to tell you not to mistreat anyone, that is obvious.  The Torah is just giving an extra reminder in case you are tempted to take the needs of a socially underprivileged person less seriously.