Urine Sample Before Gyno Visit

Yesterday I went to go switch birth control pills. They told me they needed a urine sample before getting started, so I gave them one, but forgot to ask what it was for. Does anyone know???