Rabbi Yochanan ben Nuri said: How should we rule regarding the co-wife of an ervah? If we rule according to Beis Shamai and allow the yavam to perform a yibum with the co-wife, the children will be mamzeirim (illegitimate) according to Beis Hillel. If we rule according to Beis Hillel and exempt the co-wife from chalitzah and yibum, thus allowing her to marry another man; the children will be tainted (if she marries a kohen without first performing a chalitzah) according to Beis Shamai. Therefore, he wished to establish that they should have chalitzah and not yibum. This would accommodate both opinions. They were not able to resolve the matter in this way.
Rabban Shimon ben Gamliel asked them: What will become of all the earlier co-wives who were taken in yibum; their children will all be regarded as mamzeirim?
This is a proof that Beis Shamai did practice according to their own viewpoint.
The Gemora counters: Perhaps Beis Shamai did not permit the co-wives to be taken for yibum; Rabban Shimon ben Gamliel was asking according to Beis Hillel. Previously, they allowed the co-wife of the ervah to marry someone else without a chalitzah. If we would enact that the co-wives would require chalitzah, what would we do to all those co-wives who married another man? Should we perform a chalitzah now; this would be revolting to their husbands, and it is written [Mishlei 3:17]: The Torah’s ways are ways of pleasantness and all its paths are peace.
The commentators prove from this Gemora that Beis Din should not issue new decrees that will result in children born earlier to be rendered mamzeirim.
The Terumas Hadeshen (II, 21) asks: Why are we more concerned with the children born before, let us concern ourselves with the future children and institute a new decree, so that the marriages will be in accordance with halacha?
The poskim offer various distinctions as to when we are concerned and when we are not. (See Terumas Hadeshen, Maharit (I,86).
The Minchas Elozar (IV, 17) proves from here that Beis Din does not institute a new decree only when the result will lead to mamzeirim, however in regards to a mikvah, where the concern is not pertaining to mamzeirim, rather that a child will be considered a ben niddah, tainted, we are not concerned and Beis Din may issue decrees regarding a mikvah.
It is noteworthy that the Terumas Hadeshen (74) says that one time, one of the sages from Lenaistadt came to the city and wanted to change the lechis (poles for the eruv) to make them thicker in order to uphold the opinion of the Mordechai, who states that they should be as thick as one’s finger. The leaders of the city did not allow him to because people will say that up until then everyone had desecrated the Shabbos.
Sheorim Mitzuyanim B’halacha states that this is because the halacha is in accordance with the lenient opinion in regards to the laws of an eruv.