The Torah prescribes settling the law in a very special place:
"If a case is too baffling for you to decide, be it controversy over homicide, civil law, or assault—matters of dispute in your courts, you shall promptly repair to the place that the LORD your God will have chosen, and appear before the Levitical priests, or the magistrate in charge at the time, and present your problem." Deuteronomy.17.8-9
In my understanding of the passage, the Torah prescribes to authorize all future Halochos in a dedicated place (aka Sanhedrin), following certain official legal procedures.
IIRC, all halachic disputes in the Talmud occur outside the official Sanhedrin, even after its exile: in shuls, private homes and penthouses, on private journeys, etc.
Many ruling Halohos are ruled in such spontaneous gatherings, however, it is never mentioned that the gathering had the official status of a Sanhedrin, or that certain official procedures took place.
What is the legitimacy of such gatherings, and why would a decision of a spontaneous gathering even if the majority supports it, obligate others?
NB: I do not use examples, because, as I mentioned, IIRC, on the paper, all Talmudic arguments take place outside Sanhedrin.