In addition to the peshuto shel mikra meaning of the pasuk, "Banim atem la’Hashem Elokeichem lo tisgodedu v’lo tasimu korcha bein eineichem la’meis," (14:1) which prohibits a person from cutting his/her flesh as a mourning rite, Chazal (Yevamos 14) learn from this pasuk that there is a prohibition of making "agudos agudos." (Insert pun about not joining a certain organization here.) You can’t have a city where half the beis din says X and the other half says Y (or according to the other view in the sugya, you can’t have two batei din in the same city each of which presents a different view). We are supposed to be united, not divided into splinter groups each following its own path and doing its own thing.
It seems that these two halachos have absolutely nothing to do with each other, yet both somehow are rooted in the same words of the pasuk. While some (Mizrachi, Minchas Chinuch) learn that the issur of dividing into agudos is just an asmachta, the simple reading of the Rambam (Hil Aku"m ch 12) seems to indicate that both are d’oraysa, as he describes the issur of making agudos as "bichlal azhara zu…" How then, asks the Maharal, can the Torah lump together apples and oranges in the same words of the pasuk?
(This is one of many places that the Maharal makes an assumption worth taking a moment to spell out: the difference between pshat and derash is *not* that the former is rooted in the text while the latter is not. Both are intimately tied to the text; they simply relate to it on different levels. Therefore, derash cannot completely diverge from the plain meaning of the words and fly off in an opposite or completely different direction. There must be some relationship between the plain meaning of the words and the derash meaning latent in them.)
The Maharal answers by digging into the root reason behind both issurim. Rashi writes that the issur of cutting onself is because the Torah wants us to look nice. "Banim atem la’Hashem Elokeichem," and for G-d’s children to walk around with slashes in our skin is an embarrassment. (Parenthetically, I know in my son’s yeshiva the Rosh Yeshiva insisted that boys always have their shirts tucked in, but that is the exception. How many times do you see yeshiva bachurim in the street walking around like total shlumps? It may not violate the letter of this law, but it surely violates its spirit.) Ramban takes issue with Rashi. If the issur is a matter of appearance, then why does the issur only apply to cutting done as a response to death? Why not any dishevelment in response to any sorrow or tragedy? Rashi might not have been bothered by this problem because perhaps he viewed ta’amei hamitzvos as abstract philosophical ideas not meant to explain the details and parameters of dinim, or it could be that Rashi held that someone who would disfigure him/herself at something other than death is so outside the pale that batlah da'ato and that's why there is no issur. In any case, Maharal proposes something different. "Banim atem l’Hashem Elokeichem" means our relationship with Hashem is so close and special that something essential about him is reflected in us. One of the most fundamental things we can say about G-d is that he is one. The idea of cutting oneself into pieces when faced with tragedy and the idea of dividing the community into pieces are both antithetical to this idea of oneness. We have to reflect wholeness and unity within ourselves and within the community because this is G-d’s characteristic.
The Shem m’Shmuel quotes a similar idea from his father, the Sochotchover. The reason a person would beat himself up and go to pieces (literally) when confronted with death is because that individual sees the physical body as everything. Once the physical person is gone, there is nothing left -- the loss is total and unbearable. This emphasis on the tangible and physical to the exclusion of matters of the soul is the same underlying error that causes division in the community. If we were all focused on ruchniyus, on what matters, then there wouldn’t be "agudos agudos," factions fighting with each other. The issur redirects our values -- there is something that endures even after death; there are values greater than physical needs and wants that unite our community.
The Shem m’Shmuel asks what I think is a tremendous question against his father. Is "agudos agudos" really only because we are not focused on the spiritual? Beis Shamai vs. Beis Hillel – is that split into factions caused by these giants attuned to the "guf" instead of the "nefesh"? Impossible to believe. There can be deep and important disagreements even when both parties are only interested in "l’shem shamayim." I don't think this is any less true of disagreements between contemporary Rabbonim than it is of machlokes between Tanaim and Amoraim. I think that lesson is even more important to walk away with than the answer he gives, which you can look up inside : )
I want to offer one final suggestion to try to explain the common theme of these two halachos. Ibn Ezra writes that the reason one should not be overcome with grief and harm oneself in mourning is because "banim atem," we are like like little children who cannot understand what or why a parent does what he/she does. G-d's ways are unfathomable, and death is the ultimate mystery. There is a reason for loss, even if we cannot understand it, and that should at least give us some comfort. The takeaway lesson according to Ibn Ezra is that we never have full knowledge. How then can each camp of the agudos agudos dig their heels in and argue with such certainty that they alone are right and there can be no compromise with the other side? "Banim atem," it would be like little children arguing on the playground. The Torah expects us to rise above such pettiness. When each side recognizes that their position as well as that of the other side is of necessity borne of incomplete knowledge and understanding, then dogmatic certainty and inflexibility have no place, and two agudos can merge into one.