While the active ingredients in a generic vs. brand name are the same, it's the inactive ingredients which are often different. These are things like the fillers, the color enhancers, sometimes the flavor aspect, it all depends. I asked a pharmacist about this once, too, and he told me that very frequently, especially with the Pill, some women just have an intolerance to one or more of the inactive ingredients in the generic, so they have to keep trying a different one before they find one that doesn't cause whatever problem they are having. So, my best guess in your situation is that perhaps you may have been allergic or just your body didn't respond well to something in the inactive properties of that particular pill, and that's why you had that problem.
It's good you worked it out though!