Instead of drinking liquor straight/neat (without a mixer), soda water and carbonated soft drinks helped dilute alcohol, and made having a drink more socially acceptable.
The sweet-and-sour syrup could be mixed with either water or soda water and served as a soft drink, or it could be used as a mixer in alcoholic cocktails.