The Mishna on today’s daf relates that Ezra the Scribe decreed that one who is ritually impure because of a seminal emission may not engage in matters of Torah until he has immersed in a ritual bath and purified himself. Based on this the Mishna teaches:
If the time for the recitation of Shema arrived and one is impure due to a seminal emission, he may contemplate Shema in his heart, but neither recites the blessings preceding Shema, nor the blessings following it.
The Gemara (Bava Kamma 82a) cites a tradition with regard to the ten ordinances instituted by Ezra in order to enhance fulfillment of both mitzvot by Torah law and ancient customs. The common thread among all the ordinances was enhancing the sanctity in the daily existence of the people. By Torah law, one who experienced a seminal emission is ritually impure and prohibited from eating teruma and consecrated foods. In his ordinance, Ezra instituted that the individual must purify himself before praying or engaging in Torah study, as well. Although the ordinance was repealed several generations later, it remained the custom in many communities as well as a custom of the pious throughout the generations.
The continuation of the Gemara (daf 22a) teaches that:
“When Ze’iri came from Eretz Yisrael to Babylonia, he taught, ‘They abolished this ritual immersion.'”
According to most commentaries, (e.g., Rambam, Ra’avad, Shitta Mekubbetzet, Talmidei Rabbeinu Yonah), they could do so because Ezra’s ordinance did not gain acceptance throughout Israel. The principle is that any ordinance that did not gain acceptance, even if it was instituted by Torah giants, may be overturned by later generations; even by a court of lower stature than the one that instituted it in the first place. Indeed, the ordinance was repealed for several reasons. It led to dereliction in the study of Torah and it discouraged procreation. Therefore, it only remained as a custom to enhance sanctity.