Our Gemara on this daf, and many pages in this mesechta, discuss situations where the judges of the Sanhedrin make a mistaken ruling. All humans can make mistakes—even great sages, and even the entire supreme body of Torah law—though we shall soon see this is nuanced.
For example, we learn on our daf that an ordinary person who is told by the Sanhedrin that a particular kind of fat is permitted is exempt from a private sacrifice because he was innocently following the ruling of the Sanhedrin. However, a knowledgeable sage would have to bring his own private chattas offering, because even though he was mistakenly obeying the sages, it is considered an error on his part to trust them to that extent.
Rashi (Devarim 17:11) famously quotes the Sifri, based on the verse:
“You shall act in accordance with the instructions given you and the ruling handed down to you; you must not deviate from the verdict (of the Sanhedrin) that they announce to you either to the right or to the left.”
[What is meant by the choice of words, “right or left”?]
Even if he (the judge) tells you about what appears to you to be right that it is left, or about what appears to you to be left that it is right, you have to obey him.
The question is: How literal is this? Is one to really doubt their own sense data and override it, relying on the sages?
The Ramban (ibid.) implies that we should trust that the Sanhedrin is benefiting from divine inspiration, and even if the ruling does not make logical sense, one should still follow it. The Ramban seems to stop one step short of actually expecting a person to believe it. Rather, he expects the person to humbly assume that even if it doesn’t seem to make sense logically, this is the will of God.
Rashash asks in our Gemara: But indeed, it is a commandment to obey the sages, as we are taught—even if they say that your right is your left hand, and your left hand is your right hand. This applies even to the most learned sage. So why is he personally liable for following their ruling? He really had no choice but to obey!
Rashash suggests that the case in our Gemara is talking about one who was too obedient—meaning he simply went along with the ruling, even though he had misgivings but did not express his dissenting logic. In that case, he is liable because he should’ve known better, and perhaps the other judges would have been swayed by his argument. However, if he expressed his arguments and his colleagues issued a ruling, he must follow it no matter what, and of course then he would not be liable if the ruling turned out to be in error.
Divrei Dovid on Rashi (also author of the Taz on Shulchan Aruch) explains the parameters of the obligation to obey differently, thereby obviating the Rashash’s question. If a learned judge believes that the Sanhedrin is indeed in error, and it is something that he can passively abstain from without it being obvious that he is contradicting the ruling of the Sanhedrin, he may do so. For example, if the Sanhedrin rules that a certain kind of fat is permitted, without making any obvious objection he can simply avoid eating it. This would not be a sign of disrespect because people abstain from foods for all kinds of reasons. On the other hand, if it is a ruling such as to perform a commandment at a particular time on a particular day, then he must subordinate his own rational assessment and abide by the ruling.
The approach of the Divrei Dovid makes it possible to understand how in our Gemara a sage could be held liable. If it was a matter that he could have possibly abstained from, since he believed the Sanhedrin’s ruling was in error, he should have abstained. If he didn’t, then he is liable for a private chattas offering.
There are two other explanations of the obligation to obey the rulings of the Sanhedrin, which do not directly address our Gemara but have nuanced distinctions regarding its limits. (They will still have to use either the Rashash’s or the Divrei Dovid’s answer above.)
Gur Aryeh (ibid.) takes the most strict approach: We must obey the rulings of the Sanhedrin even regarding a matter that literally tells us our left hand is our right hand. This is because the same Torah that forbids certain fats or actions can also obligate and override such prohibitions in service of maintaining order. Therefore, whatever the sages of the Sanhedrin determine after good faith due deliberation and process is “right,” even if it is wrong.
If so, according to Gur Aryeh, the Sanhedrin’s sin offering discussed in this mesechta is ironically self-referential. Meaning, if after their ruling they themselves determine that their reasoning was in error, they must bring a sin offering. If they maintain, they are correct, then they do not, no matter whom else offers proofs
One final idea from the Meshech Chochma (ibid.): He looks at it more practically. It is God’s will that the Sanhedrin should have the final word to apply their good faith attempts at arriving at the truth. As a practical matter, so there won’t be anarchy, one must obey, and this too is the will of God. He says, technically, a specific ruling might be in error in its particulars and not be an accurate interpretation of the will of God, but God commands us to obey anyhow. This is subtly different than the Gur Aryeh, because according to Gur Aryeh, such a ruling is not even considered wrong in its particular detail, while according to Meshech Chochma it may still be wrong, but the general obligation to obey supersedes the particular.
In other words, the difference between the Meshech Chochma and the Gur Aryeh can be seen as similar to the hutra vs. hudcha chakira regarding overriding Shabbos to save a life. Is it hutra, that is, the entire laws of Shabbos do not exist in relation to life-saving? Or is it hudcha, that Shabbos exists but is overridden by the higher imperative to preserve life? According to Gur Aryeh, once the Sanhedrin rules, even if technically incorrect, it becomes the law—hutra. While according to Meshech Chochma it is still wrong, just hudcha, that is, permitted and even obligated due to the overriding need for order and law.
You might even say poetically that this too is a case of permissibility for a life-saving cause. Just in this case, it is societal and spiritual pikuach nefesh that overrides the particular rule.