Beer contains ethyl alcohol, the same chemical that is present in wine and distilled spirits and as such, beer consumption has short-term psychological and physiological effects on the user.
Alcohol acts as a magnesium diuretic, causes a prompt, vigorous increase in the urinary excretion of magnesium and other electrolytes.