What is the purpose of vinegar in this lollipop recipe?
It is simply to add tartness to add some balance against the sugar. The water from the vinegar will evaporate and leave behind acetic acid. There is an old fashioned type of hard candy known as vinegar candy. Your lollipop is essentially just that candy on a stick.