The body makes many chemicals which are required for normal functioning. However, there are many chemicals which are normally produced by the body but are not required. Some of these chemical byproducts such as Ammonium and Urea can be harmful if they accumulate in the body and the kidneys excrete these waste products as chemicals in the urine.
The kidneys also excrete excessive acids from the body, thereby maintaining an appropriate acid-base balance which is vital for good health.
If kidneys fail to function normally, waste products accumulate in the body and lead to symptoms, disease and eventually death from kidney failure.