Why are the bacteria that cause hospital-acquired infections resistant to many antibiotics?
Hospitals have certain features:


They are full of people immunocompromised in some way (old, exposed tissue, on steriods etc.)
They are full of people with pathogens
They are full of doctors who will give antibiotics to people with pathogenic infections


This is a perfect breeding ground for drug resistance in pathogens, with lots of pathogens, lots of places for them to grow (patients) and quite a lot of exposure to antibiotics.  You use Staphylococcus aureus as an example, and it is a good one.  We all have some of it on us, but it is not generally exposed to antibiotics so it does not develop resistance, and we do not generally have large areas of exposed flesh that would cause it to be pathogenic.  In hospital this is not the case, so we get it causing trouble and developing resistance.

These things do occur outside of hospitals, but it does not tend to be as common or frequent.