Humans, like other living creatures, strive to maintain homeostasis, which means balance. The brain and other organs work together to regulate body temperature, blood acidity, oxygen availability and many other variables. Given that living organisms must take in nutrients and water, one important homeostatic function is elimination, or the ability to excrete chemicals and fluid, so as to maintain internal balance. The urinary system plays important excretory and homeostatic roles.
The urinary system consists primarily of the kidneys, which filter blood; the ureters, which move urine from the kidneys to the bladder; the bladder, which stores urine; and the urethra, through which urine exits the body. Functionally, the kidneys are the most complicated part of the system. Explains Dr. Lauralee Sherwood in her book "Human Physiology," the kidneys work by filtering blood through long tubes, then returning the filtered blood to circulation, while some fluid and the waste products exit the kidneys as urine.
One important point with regard to understanding the urinary system is that, in general, the system isn't designed to eliminate fluid. Generally, humans strive to maintain body fluids. As such, the kidneys eliminate as little fluid as necessary, but toxins and waste products must be dissolved in water to be excreted, so some fluid elimination is unavoidable. Dr. Sherwood notes that overall, the kidneys play a crucial role not in eliminating, but in maintaining body fluid--if they weren't so excellent at maintaining fluid, the entire blood volume would be urinated out in a matter of hours.
Perhaps the role of the urinary system with which most people are familiar is that of excretion; through urination, humans rid themselves of extra water and chemicals from the bloodstream. In their book "Biochemistry," Drs. Reginald Garrett and Charles Grisham note that the urinary system helps eliminate nitrogenous waste produced by protein digestion from the bloodstream. Also, the kidneys play a role in maintaining a normal blood acidity, by eliminating or maintaining acidic and basic compounds in the blood.
Another important aspect of the urinary system is its ability to distinguish between compounds in blood that are useful to the body and should be maintained, like sugar, and compounds in the blood that are toxic and should be eliminated. The filtration system of the kidneys, made up of functional units called nephrons, is capable of distinguishing between the different compounds dissolved in the blood, and eliminating only those that are not useful. In his book "Anatomy and Physiology," Dr. Gary Thibodeau notes that healthy kidneys are so good at maintaining useful compounds that urine contains, for instance, no detectable sugars under normal circumstances.
Since the kidneys need water to make urine, they function best in well-hydrated individuals. Those who drink plenty of water and maintain good hydration form large quantities of dilute urine. This helps protect the health of the bladder and kidneys, which are adversely affected by the concentrated toxins in low-volume urine. Notes MayoClinic.com, urinating frequently also prevents bacteria from colonizing the bladder, and helps prevent urinary tract infections.