So what do acids do in soap?
The chemical reaction between any acid and any alkali is called an acid-base neutralization. The specific acid-base reaction that makes soap is called saponification.
The offspring of an acid-base neutralization is a salt. Table salt (sodium chloride, NaCl) is one kind of salt; there are many other salts. Soap is the salt created when fatty acids react (saponify) with an alkali such as NaOH or KOH.
Sometimes soapers add other acids to the soap pot in addition to fatty acids. When they do this, non-soap salts are created along with soap. Depending on which kind of non-soap salt is made, it can make bar soap easier to pour and unmold, make liquid soap easier to dilute, increase the hardness of bar soap, protect against rancidity (DOS, dreaded orange spots), reduce the amount of unpleasant soap scum, and/or add label appeal.
Acids commonly added to soap include lemon juice (citric acid), vinegar (acetic acid), and yogurt (lactic acid). Adding these acids complicate the soap making process, because they react faster and more easily with NaOH or KOH than fatty acids do.
Why do other acids react faster than fatty acids?
There are strong and weak acids; likewise there are strong and weak bases. Stronger acids and bases are "bullies." They take what they want first in an acid-base neutralization. Weaker acids and bases react with the leftovers.
Baking soda is a weak base, and sodium hydroxide is a strong base. Vinegar (acetic acid) is a weak acid and battery acid (sulfuric acid) is a strong acid. Fatty acids are weaker than any of the other acids mentioned so far, so they always lose when they compete against these acidic "bullies."
That means if you add a stronger acid to your soap, the stronger acid will react with all of the alkali it wants. The weaker fatty acids will react with whatever alkali is left over.
If there is not enough NaOH or KOH to properly react with all of the acids in the soap pot, that means the fatty acids will not fully saponify. The soap will have more free fat and/or fatty acids than expected, and the superfat will be higher than you planned.
How can this extra superfat problem be avoided?
If you want to add extra acids to your soap, you should also add enough alkali to react with all of the acids in the soap pot.
Any good soap recipe calculator will calculate the proper amount of alkali for making the soap itself. You will need to calculate the extra alkali needed to react with the added acid. The articles about acids linked above explain how to do these calculations.
My soap looks fine, so why bother with the extra math?
I am aware that quite a few soapers add vinegar (or other acid) to bar (NaOH) soap without adding extra alkali. They claim their soap is perfectly fine, because there are no visible changes to the soap.
Just because a soaper cannot see any changes in her soap does not mean there are none. The superfat in the soap has increased in direct proportion to the amount of acid added. This extra superfat can make bar soap softer, reduce lather, cause plumbing problems, and increase the chance of rancidity (DOS).
An example -- If I use commercial vinegar (5% acetic acid) for all of the water in my favorite soap recipe and do not add extra NaOH, the added acetic acid would increase the superfat by an extra 7%, in addition to the lye discount already built into my recipe.
If a lot of extra acid is added to a bar soap recipe without considering the consequences, the result will be a mushy, greasy mess that is definitely Not Good Soap! The Soaping 101 video "Cold Process Citrus Soap" is an extreme example of this. Although the acid used in that video is citric acid from lemons, this idea applies to any acid, including vinegar.
What if I make plain soap first and then add the stronger acid?
Sometimes soapers add an acid after saponification is over, on the theory that the added acid will remain intact or will only lower the pH or will otherwise do what the soaper wants it to do because the soap is already made. This does not work.
The added stronger acid will still have a bullying nature when mixed with finished soap. It will bump the weaker fatty acid out of its place on the soap molecule and take its place. The altered molecule will then be the salt of the stronger acid. The extra fatty acids will add to the superfat.
In other words, adding a stronger acid to soap after the soap is made is roughly the same as adding the acid at the start of the soap making process.
Does liquid soap have the same problem with added acids?
The consequences of adding extra acid to liquid (KOH) soap are even more obvious and dramatic, because liquid soap is not able to hide a high superfat like bar soap can.
As the superfat rises above about 3% in a liquid soap, the extra fat and fatty acids cannot remain mixed with the soap. Instead, an increasingly thick layer of fat and fatty acids will separate out and float on the diluted soap.
Acids added to liquid soap include the ones already mentioned as well as boric acid and borax. (Borax is technically a salt, but it functions as an acid when added to soap.) Any of these acids will increase the superfat of liquid soap and cause unwanted separation.