For more on this, I highly recommend Bottle of Lies by Katherine Eban. Fantastically written book that goes deep on this topic and will absolutely horrify you about everything related to the manufacture of generic drugs.
But the quality of manufacturing stuff is just unbelievable. You take for granted that our medications are highly regulated and it turns out to not be remotely true...