When one eats and drinks, the body digests the useful parts of the food (which give strength and energy) and excretes the rest. If the digestive system is not working properly, suffering and sickness follow. If doctors cannot treat the problem, the result is a painful death. Therefore, the Sages composed a blessing to be said after urinating and defecating. After one uses the facilities and washes hands, one thanks God for the healthy functioning of the body by reciting the Asher Yatzar blessing.
Often a healthy person is oblivious to the importance of the body’s ability to get rid of waste. (Only after people get sick do they understand how much thanks is due to God for this system.) This is paralleled in other areas as well. Much of the harm a person suffers is due to unhealthy excesses of one sort or another, whether intellectual or emotional, in the body or the home. Failure to remove any problematic accumulation leads to deterioration. This is the point of Asher Yatzar. In this blessing, we thank and praise God for creating us in such an amazing way that we have the ability to absorb what is good for us and to reject that which is unnecessary or harmful.
Someone who needs to go to the bathroom should do so as soon as possible, to eliminate the waste. One who waits until desperate and needs to hold it in, is endangering health and dishonoring the body. However, people with a group, where leaving to use the bathroom would be very embarrassing, are permitted to wait.