Birds excrete a paste instead of watery urine, trading energy for water
How an animal disposes of nitrogen waste depends on how much water it can spare. Aquatic animals simply release toxic ammonia into the surrounding water. Land animals convert it into safer urea. Birds go further, turning it into a pasty uric acid that costs more energy to make but saves precious water.
Excretion is the removal of metabolic waste, and every living thing does it. The chemistry of staying alive, including cellular respiration, produces carbon dioxide, water, salts, urea and uric acid, and letting them build up beyond a certain level is harmful. In vertebrates the lungs, kidneys and skin share the job, with the liver and kidneys clearing substances from the blood so they can leave in urine and faeces. Excretion differs from secretion, in which a released substance still has work to do. Single-celled organisms just push waste out through their surface.
Nitrogen is the tricky part. Ammonia dissolves easily, so aquatic animals can let it dilute away. On land, where water is scarcer and ammonia is poisonous, animals convert it into less harmful compounds in a process called detoxification. Birds excrete uric acid, which lets them retain water efficiently and is easier to store inside an egg. Many seabirds also get rid of excess salt through special glands whose brine drains out of the nostrils in the beak. Spiders and their relatives excrete guanine.
Insects use a different plumbing system. Waste diffuses or is pumped into Malpighian tubules, which deliver it to the intestine to leave with the faeces. Plants excrete too: oxygen from photosynthesis escapes through stomata, resins, saps and latex are forced out passively by internal pressure, and deciduous trees shed waste when their leaves fall.
Long a taboo in fiction, the subject has been used for satire, worldbuilding and horror. Frank Herbert's Dune imagined waste-recycling technology, and a 1973 story by Ursula K. Le Guin, set in the utopian city of Omelas, tied excrement to the degradation of the child on whom a utopia depends.
Source: Excretion