Historically, urine has had a number of uses, and laundry is only one of them. People have used urine for bleaching and general washing, and urine has also been used in fulling, the process used to treat wool before sale. In addition to being used as a cleaner for garments, urine was also historically used in toothpastes, which may seem a bit unpleasant to the modern world.
The trick to using urine for bleaching is allowing it to stand, encouraging the development of ammonia by allowing the urine to react to the air. The resulting ammonia is the cleaning agent, rather than the urine itself. Once ammonia has developed, garments can be dipped in the urine, or small amounts of the liquid can be used to treat spots and stains. To full wool, people traditionally poured stale urine over wool in a large vat, and people walked on the wool, agitating it and allowing the urine to penetrate to clean it.
When laundries used urine for bleaching, it was a fairly stinky process. The urine had to be allowed to sit in vats for weeks to develop the necessary ammonia levels, and it could leave an unpleasant odor behind after it was used as a cleaner. In ancient Rome, urine was actually taxed because people considered it to be so valuable, and it was collected from various public locations for sale to laundries. Well through the Tudor era in England, urine was used for bleaching; those stiff white ruffs associated with the Tudors would not have been possible without a bit of urine.
You may not encounter a situation where people use urine for bleaching in the modern world, but the legacy of this cleaning tradition lives on in the form of many products. Many cleaners today continue to use ammonia-based products, although they are not generally derived from urine. You may even have some ammonia under your sink, in which case you may be familiar with the cleaning power of this chemical.
Historical novels set in eras when people used urine for bleaching often include a nod to this tradition, because people find it interesting and perhaps a bit morbidly fascinating. Urine was sometimes referred to as “chamber lye,” a polite euphemism referencing the cleaning power of urine and its source, the humble chamberpot. In addition to urine, people also used things like wood ash as a stain remover, harnessing the natural lye in the ash.
The ammonium in urine will actually react with real bleach, incidentally.