To buffer the excess acid formed by your diet, kidneys produce ammonia, which is a base and can neutralize some of that acid. Counteracting the acid is beneficial in the short term, but over the long run, all the extra ammonia in the kidneys may have a toxic effect.