UTI 's are very common in pregnant women but generally do not pose any danger to developing foetus. However untreated UTI can progress to kidney
infections ,which are far more serious.
Doctors treat kidney infections aggressively in pregnancy
because they can cause problem to both mom and baby.These include pneumonia
,pre term labour,infection spreading to other organs through blood stream etc.
Similarly skin infections do not pose any risk for birth defects.However open wound makes it easier to catch other infection which might be harmful to the baby,so it is important that these infections are treated immediately and aggressively.
Your doctor is absolutely right in treating you aggressively by several antibiotics.
Relax,as there is no harm to baby.