Normal urine is acidic in nature. Once the urine is passed, it undergoes decomposition and gives rise to an unpleasant ammoniacal odour as in the case of alkaline fermentation in nature under atmospheric conditions. Bacteria act on the urine and the effect on urea is to convert it into ammonium carbonate. Bacteria and yeast can act on glucose also as in the case of diabetic urine. If the urine is alkaline or becomes alkaline under the atmospheric conditions, phosphates are precipitated. On standing, uric acid and urates are deposited.
Urobilinogenis oxidised to urobilin and ascorbic acid is also oxidised. Proteinuria, urine that contains proteins, as such has a typical smell and undergoes decomposition easily. When the urine is passed, and the place dries up when left uncleaned, only the water and the volatile components present in the urine evaporate, but the other above mentioned components and the products of their chemical changes remain in the place and impart an odour to the place itself.
Source: thehindu.com