Urinary tract infection could also be a reason for back pain, but As a doctor it was his responsibility to explain you about the medications which he clearly did not do, as a patient it is your responsibility also to ask as many doubts as you can to your doctor until your problem and it’s treatment is clear to you.
Next Steps
Kindly consult back the same physician and ask him why he prescribed you antibiotics, and if your not satisfied with that doctor, consult another good physician.