It is probably just that the bladder infection didn't respond to the antibiotics they gave her. I'd guess the second course they prescribed was a longer course or a broader spectrum antibiotic and will likely take care of the issue just fine.
Bladder infections are not uncommon in dogs. They are more common in females than males. Sometimes a dog's lifestyle will contribute to UTIs (urinary tract infections). For instance, if a dog has limited access to water then they will end up urinating less than normal and their urine will be more concentrated. This can promote the development and growth of bacteria in the urinary tract. Also, dogs that are crated for long periods of time that require that they hold their urine are going to be more prone to contracting UTIs than are dogs that urinate on a more frequent schedule. Making sure a dog has access to fresh water all the time and an opportunity to urinate frequently will ensure that the bladder contents are naturally "flushed" out.
Sometimes UTIs result from an underlying health issue like bladder stones/crystals. Some dogs are more prone to developing bladder stones or crystals. Diet can also affect the formation of stones/crystals. The pH (acidity or alkalinity) of the urine is also a contibuting factor to stone or crystal formation. A simple urinalysis would determine the pH of your dog's urine and/or the presence of crystals and if it were found to be to acidic or alkaline or contain crystals your vet might recommend a diet change and/or further course of treatment. Some dogs just naturally register at a lower or higher pH than normal. This isn't a typical puppy problem though--more common in adult and senior dogs.
UTI can also result from physiological abnormalities like a narrower than usual urethra, or the bladder sitting in an atypical position in the body cavity. Both these conditions can result in the bladder not emptying normally and create an environment where bacteria can multiply in the bladder or urinary tract. These conditions aren't really common though. If a dog has a history of multiple UTIs or multiple UTIs that need a longer than typical course of treatment then the vet might suspect some physical abnormality and might order an ultrasound.
In general, it's a good idea to keep an eye on your dog's pee. At least once a week I try to note how many times they are going, if they appear to be straining to pee, if it comes as a steady stream or if it trickles or spurts out, if it is a normal color and smell, if they seem to pee without realizing it, or if they pees in her sleep, if they appears to be in pain while peeing, and if there are changes in the amount they are drinking. If I notice anything unusual then I report it to my vet. I've caught a couple of conditions/illnesses early because I noticed a change in their urine.