Emor

"You shall not profane My holy name, and I shall be sanctified in the midst of the Children of Israel, I am the L-rd Who sanctifies you" (Leviticus 22; 32). The idea of Minyan is derived from this verse by the Talmud. The Bavli (Babylonian) and Yerushalmi Talmud use different events to illustrate this concept. Both verses contain the word 'midst' and each Talmud applies the hermeneutic principle of Gezeira Shava to learn from an identical word elsewhere in the Chumash.
The Bavli learns from Korach's rebellion against Moshe and the twelve spies who brought back the evil report about Israel. Before G-d destroys Korach and his cohorts, He tells Moshe and Aharon "Separate yourselves from the midst of this congregation, and I shall destroy them in an instant" (Numbers 6; 20). We learn here that the word congregation means ten men, as it says "How long for this evil congregation that provokes complaints against Me..." (ibid. 14; 26). Though there were twelve spies who scouted out the land of Israel, Joshua and Calev brought back good reports, so only ten were considered the evil congregation.
The Yerushalmi Talmud derives the need for ten men from Joseph's brothers when they came to Egypt to purchase grain. The verse states "The sons of Israel came to buy provisions in the midst of those who came..." (Genesis 42; 5). Though Ya'akov had twelve sons, Joseph was already in Egypt, and Benjamin did not go with the others, so there were ten who came into Egypt. Rashi explains the word 'midst' means that they disguised themselves when they entered Egypt, and it was for this reason that Joseph was able to accuse them of being spies. However, according to the Midrash, the reason that they disguised themselves was in order to find Joseph who they had sold into slavery. So, as above, the need for a minyan is based on a group sin.
The simple explanation of a Gezeira Shava is that when the same word appears in two places the Rabbis can learn a concept from one to the other. However, on a deeper level, it seems that there is some connection between these incidents, and the need for a quorum for prayer. Somehow prayer with a minyan must be intended to correct those sins. The Halacha states that we may not say Barchu, Kaddish or Kedusha without a minyan. These are the most holy of prayers, describing G-d's sanctity.
If we look closely at all three incidents, the spies, the brothers and Korach's rebellion, we see that ultimately they were a struggle for leadership. The spies were the leaders of their tribes in the desert. According to the Midrash they were afraid that once they came into the land of Israel and each person had their own portion of land their power would be diminished. Therefore they plotted to remain in the desert as long as possible. Korach's quarrel with Moshe and Aharon was also a power struggle. His main complaint was that his younger cousin had been made the head of the family, not he. Finally, the reason that the brothers sold Joseph was because of his dreams that they would eventually bow down to him. They wanted to remove this 'claimant to the throne' from their midst.
It is not only people who proclaim G-d's sanctity, but also the angels. In Isaiah’s vision of the heavenly host he describes them. "And one cried to another, and said, 'Holy, holy, holy, is the L-rd of Hosts, the whole earth is filled with His glory." (6; 3). It seems that even amongst the angels G-d's sanctity can only be proclaimed after they have all called to each other for permission. Though each angel has its own specific and unique mission, only when they all unite is G-d's unity proclaimed. Through showing that all the separate tasks are part of a single Divine plan G-d's sanctity is shown to the world.
This is exactly the same with people. As long as each person is struggling for their own personal interests, in the so called 'survival of the fittest', G-d remains hidden from the world. Whether it is a power struggle between princes, Rabbis or sons of Ya'akov, the egocentric focus does not allow room for G-d to be perceived. However, when a group of people unite to pray, to sanctify G-d through praise, their own personal interests must be set aside. Therefore each time we make a minyan for prayer, we partially correct the underlying character defect that led to the sins from whence we derive the need for a quorum.