In summary, if you're wondering how many beers a day is safe, the answer for most people is one to two. Drinking more than that on a regular basis can put you at risk, and often reverse any health benefits of drinking beer. It's a fine line to walk.
As such, a better-quality alcohol can be assumed to have been distilled multiple times, but a cheap alcoholic beverage may have been distilled only 1-2 times. So, if you drink cheap booze, you risk taking in more impurities to your system than your body can easily process. Hence, the godawful hangover.