Vayikra 16:16
וְאִישׁ כִּי תֵצֵא מִמֶּנּוּ שִׁכְבַת זָרַע וְרָחַץ בַּמַּיִם אֶת כָּל בְּשָׂרוֹ וְטָמֵא עַד הָעָרֶב
A man from whom there is a discharge of semen, shall immerse all his flesh in water, and he shall remain unclean until evening.
One who experiences a seminal discharge is known in Talmudic literature as a ba’al keri. Such a person is tamei, and if he is a kohen he may not partake of terumah or kodashim until he immerses himself in a mikveh and waits for nightfall. Under Torah law, this is the extent of the restrictions placed upon him.
Ezra the Scribe decreed that a ba’al keri must also refrain from articulating words of Torah until he immerses himself. In regard to others who are tamei for different reasons, such as a zav, a zavah, a metzora, a woman who gives birth, or one who comes in contact with a dead body, there is no such restriction.
Ezra’s decree has nothing to do with the impurity of the ba’al keri per se. Rather, it is based on the restriction at Sinai which prohibited sexual relations for a period of three days prior to the giving of the Torah (Ex. 19:15), a restriction which included any seminal emission. Based on this historical restriction, Ezra extended the prohibition of a ba’al keri to all Torah study, and a Beis Din subsequent to Ezra further applied the restriction to prayer as well. (Both restrictions have since been rescinded according to most authorities).
In connection with this, the Mishnah in Berachos (20a) discusses how a ba’al keri recites the Shema: When the time arrives to recite the morning or evening Shema, a ba’al keri is to contemplate the words of the Shema in his heart rather than say them aloud. However, when it comes to the Birchos Kerias Shema, the blessings that accompany the Shema recitation, he should not even contemplate them. Ravina explains that the reason one can fulfill the mitzvah of Kerias Shema by mere contemplation is because hirhur kedibur dami, contemplation is the halachic equivalent of recitation. What is the difference between the Shema itself and its accompanying berachos? One possibility is that the Shema recitation is a Biblical commandment. As a result, the rabbis did not have the power to rescind this requirement entirely. However, in regard to the Birchos Kerias Shema, which are a rabbinic requirement, the rabbis indeed had the power to rescind the requirement for a ba’al keri.
An alternative explanation for why a ba’al keri must contemplate Kerias Shema but not its berachos is that even when a mitzvah creates an obligation upon the individual, the rabbis have the power to prohibit certain actions through which that obligation is fulfilled. For example, although there is an obligation for an individual to hear the shofar on Rosh Hashanah that falls on Shabbos, the rabbis had the ability to prohibit the act of blowing the shofar on that day. Strictly speaking, the obligation to hear the shofar remains; the rabbis simply made it impossible to fulfill the obligation. Similarly, in the case of Kerias Shema, the rabbis prohibited the act of recitation by a ba’al keri. However, unlike the case of shofar, a permitted pathway remains to allow him fulfill his obligation: contemplation. For the berachos of Kerias Shema, in contrast, the rabbis actually relieved the ba’al keri of the obligation entirely. (Reshimos Shiurim – Maseches Berachos, pp. 282-283)