Apart from adding flavour, the acidity of the vinegar helps maintain the red/purple colour of the cabbage. If you were to add an alkaline substance such as bicarbonate of soda, it would cause the cabbage to turn blue.