How can you develop a bacterial infection when taking antibiotics for another area of the body with a bacterial infection?
Your first assumption is mostly correct


  Bacteria in the toe is a different type and didn't respond to the
  [antibiotic taken for the throat infection].


the reason being because it outlines some essential characteristics of "antibiotics" and antimicrobial drugs in general.

Selective Toxicity and Mode of Action

A very important characteristic of an antibiotic is its selective toxicity. An ideal antibiotic has a high level of selective toxicity meaning that it will only target the bacteria that is causing an infection while not damaging the host tissue (cells) and the person's biota (resident microorganisms). This characteristic generalizes antibiotics into two categories; broad-spectrum (low selectiveness) and narrow-spectrum (high selectiveness). For example, a broad-spectrum antibiotic will target both gram-positive and gram-negative bacteria while a narrow-spectrum antibiotic will either target gram-positive or gram-negative not both.

Another characteristic of an antibiotic is its mode of action or in other words the area of a bacterium that it targets to inhibit/kill it. Most commonly antibiotics target one or more of the following areas/processes:


Cell wall synthesis,
Cell membrane function,
Protein synthesis, and
Nucleic acid synthesis


It is important to know this because mode of action goes hand in hand with selective toxicity, for example an antibiotic that targets membrane function might prove ineffective against bacteria that form capsules another themselves. 

So to answer your question


  why [did] the antibiotics taken for the throat not prevent the growth of
  the bacteria in the toe?


We can reason that the selective toxicity of the antibiotic taken for the throat was narrow or that its mode of action only targets the bacteria causing the throat infection but not the bacteria causing the toe infection.