The FDA does try, but it's ineffective and totally overwhelmed. Here's a recent story[1]:
In January, FDA inspectors paid a surprise
visit to the facility in Toansa, in a rural
area north of New Delhi, and found broken
equipment, windows stuck open and flies
“too numerous to count,”
...
Workers ran quality tests over and over
until they got the results they wanted
Just google around and you will find many many many stories like this. It's been an ongoing problem with generics (mostly from India) for quite some time.I don't know if brand-name drugs are any better, probably many of the same ingredients are sourced from the same suppliers. But at least the brand-name drug has a reputation, i.e. a "brand name" to protect.
Edit: Just wanted to add: RTFA I linked to. My one quote doesn't do the situation justice. The culture at some companies is IMO really really bad.
[1] http://www.bloomberg.com/news/2014-03-06/flies-found-by-fda-...