In your case, the issue is this: If you have an allergy listed to an antibiotic, the treating physician will put it into the electronic medical record. The next time you get an infection, the computer will cross check your allergies before allowing the physician to prescribe an antibiotic to you. The computer will not just disallow penicillin, but also all penicillin analogues (ie: amoxicillin, ampicillin, etc), and all cephalasporins (there's probably twenty or more of them) since they cross-react with penicillin allergies.
The one allergy will knock out two entire classes of antibiotics.
On the other side, when you have a documented infection with a bacterial agent, the laboratory will take the particular strain you are infected with and see which all antibiotics the strain is sensitive to. The physician will then prescribe the antibiotic which the strain is most susceptable to, thereby giving you the best chance of beating the infection.
Obviously if you cannot take that particular antibiotic due to a documented allergy (or potential cross-reaction), the physician will have to prescribe something not quite as effective.
There's another problem. People who are intollerant to one medication are generally intollerant to many medications. You have to make sure you don't have a lot of allergies listed or you will end up being treated for an infection with 'big gun' antibiotics with more serious side effects.
Most of the time the physician will not even tell you how potentially toxic the antibiotic is, as it's generally not a detail physicians talk about. I've had a couple patients with dimished hearing for several months (at least!) as they were prescribed gentamycin for a simple infection because they were allergic to simpler antibiotics.