It occurred to me (while urinating) that this would seem to be selected against because water is a scarce resource. Why are we constantly losing water we don't need to through urination? What is it about the chemistry of urine and the waste products eliminated that make urination necessary as opposed to eliminating them through defecation and recovering the water on the way out?
It is probably true that toilets and other resting-ish area are always a great place to think about biology, I agree $\ddot \smile$.
In short, urine contains the waste from our blood while defecation is just the stuff that we haven't digested. Kidneys are the organs responsible for draining wastes (mostly nitrogen-containing, or nitrogenous, wastes) from our blood.
You're correct that the loss of water through urination is a considerable cost for an organism (especially those living in dry environments). But the amount of water used to excrete nitrogenous wastes is negatively correlated with the energy it costs to perform this excretion. In other words, there is a trade-off between water and energy loss during nitrogen excretion. Also the question of toxicity is important.
Animals basically have three choices to excrete nitrogenous wastes:
Not only the amount of available water in the environment should be considered in order to understand why a species is ureothelic, aminothelic or uricothelic. For example, birds are uricothelic (uric acid) probably because during the development of the embryo the wastes cannot be excreted outside the egg and therefore, excreting uric acid allows to greatly decrease the toxicity of the embryo's environment.
Note: This domain is not at all my field of study and I have no reference, typically for what concerns the toxicity, water amount and energy amount. One should not take my words for granted!
As I have already mentioned in my other post, the most important role of urea synthesis by humans is blood pH regulation and urine concentration, so it is not just about excreting a waste product... I don't think human body is very special in this case, so I think most of the urea excreting mammals use urea for the same purposes.
The urea is created from NH4+ and HCO3- in the liver (mostly) and the kidney because of blood pH regulation purposes. It neutralizes the HCO3- created by the lungs from CO2 and OH-.
The kidney reabsorbs urea in order to concentrate the urine