If you plan to can salsa or keep it longer than a few days in the fridge, vinegar adds an acid component that helps to preserve it for longer.