With UTI why was I was given the potassium citrate?

Kidney stones? Potassium citrate is commonly used to treat low urinary citrate which is a risk factor for kidney stones. Maybe you had kidney stones and are not aware of them.V.