Bladder infections, or more generally urinary tract infections (UTIs) are a very common infection in women of all ages. I would recommend talking to your doctor
to further understand this condition.
In general, urinary tract infections, or UTIs are common in women where as men rarely get the infection. The major reason is anatomy. Women have an extremely short urethra (connection from bladder to outside) which makes it very easy for bacteria to track up from the outside. On the other hand men have much longer urethra (in the penis) which protects there bladder. Most UTI's are caused by bacteria that are normally in the GI tract, so the proximity from the rectum to the urethra in women is a major cause. There are other causes that can make women more likely to have UTIs. There are genetic conditions that make women in families more susceptible than others. Diabetic women are more likely to get them as the sugar is good food for the bugs. For older women--most UTI's are associated with sexual activity.
There is very little that can be done to prevent UTI's--that is, you did not do something wrong. In general, good hygiene is important (some suggest having girls wipe after having a bowel movement should be front to back to avoid contaminating the urethra). Beyond that, recognizing the symptoms of burning with urination, blood in the urine and fevers is important as the infection untreated can infect the kidneys.
It is not your fault. Discuss further concerns with your doctor.