When this is removed from the amino acid, it immediately combines with any available hydrogen ion to form NH3, which is commonly called ammonia. Many animals, mammals included, have therefore evolved other ways of dealing with their own cellular wastes. Urea and uric acid can in turn can be excreted without damage to the tissues. But it cost more to form them in terms of enzymes that needed to be synthesized etc. And they require more water to carry them out of the body, because they are less soluble than ammonia.
Mammals use urea as the primary form in which their nitrogenous wastes are removed.
If an animal lives in water, for example, there may be little penalty for simply releasing ammonia from the body into the surrounding water. Many aquatic animals, including fish and larval insects, excrete ammonia. Frogs give us an interesting illustration of the principle that habitat determines the pathways used for handling nitrogenous wastes. Tadpoles that live in water excrete ammonia while adult frogs, which spend time on land, have switched over to urea. It has also been noted that animals that develop inside egg shells, such as birds and reptiles, have also switched away from ammonia to the less toxic urea and uric acid.