The blessing you are referring to is commonly referred to “Asher Yatzar,” and has its source in the Talmud (Berachos 60b). It goes, with free translation, as follows: Abaye said, when one comes out of a privy, he should recite the following: “Blessed is He who has formed mankind in wisdom and created in him many orifices and many cavities. It is obvious and know before Your Throne of Glory, that if one of them were to be ruptured or one of them blocked, it would be impossible for a man to survive and stand before You. Blessed are You that heals all flesh and performs wonders.”
This is considered one of the most profound of all blessings, in fact, the only blessing out of some hundred composed by the Sages, that mentions the “Throne of Glory.” That is, for one reason, as this blessing is a fulfillment of the verse “from my own flesh I will see G-d.” By focusing on the amazing wonders involved in the digestive and ensuing processes, one continues to focus on the myriad miraculous bodily processes involved in every facet of our lives and G-d’s intervention in this amazing laboratory called our body.
Your question reminds me of an article I once saw (now available on www.torah.org) by a physician who, like his peers, used to joke about the Asher Yatzar blessing as an elementary student in yeshiva. It wasn’t until medical school, witnessing the terrible consequences of even minor aberrations in the structure and function of the human body, that he began to understand the appropriateness of this short prayer. He began to realize how many things had to operate just right for the short trips to the restroom to run smoothly. He began to remember how silly the posters inscribed with the blessing posted outside the restroom had seemed to he and his friends. But after seeing patients whose lives revolved around their dialysis machines, and others with colostomies and urinary catheters, he realized how wise the rabbi had been to compose words of thanks for our bodies to be working properly and to be in a good state of health. He began to relearn the blessing. It became for him an opportunity to thank, not only for the workings of the excretory organs, but for his entire body and good health. After all, the blessing refers to the catastrophic consequences of the rupture or obstruction of any bodily structure, not only those of the urinary or gastrointestinal tract. This includes obstruction of the coronary artery, the most common cause of death in industrialized countries, some 16 centuries after the blessing was composed.
You also call to mind a story I once heard about an anti-Semitic minister who approach one of the Czars of Russia, entreating him to incite pogroms against the Jews. The Czar told him to go to the Jews’ schools and see what they teach their children, then he would make his decision. The minister went to a “cheder,” kindergarten, where he heard the rebbe teaching his students the blessing Asher Yatzar after leaving the bathroom. He knew he had his ammunition, and, returning to the Czar, told him these Jews teach their children about bathrooms in their schools. The Czar, incredulously, asked if he was serious. Upon the positive response, the Czar said that if the Jews have laws that govern their actions even in a bathroom, these are very holy people, and he must protect them!
Let’s focus on this blessing and allow it to elevate us with full appreciation of the wondrous gift of our bodies!