It is not illegal to make moonshine due to health concerns or impurity problems. The only reason it is illegal is because the government does not get paid their excise taxes. The slang word 'moonshine' means any distilled liquor that the taxes have not been paid on.
There are several brands of legal 'moonshine' on the market, which are made by companies that have filed for a distiller's permit, and paid the excise taxes on the finished product.
Because it is produced by people who do not adhere to regulations of the government. Which means there is no quality control to guarantee the safety of the product or that health safety practices were followed. Not to mention it is grain alcohol, too high of alcohol content. Most importantly because the government doesn't make any money from taxation and they can't allow that. :-)
In my state you can legally make it for consumption by your own family. However, you can not transport it or distribute it. So if you make your own and take some to a neighbor... even if you walk it over...you have just broken the law.
My neck of the woods there are fellas that have made stuff so "pure" it would remove the paint off your house or make a fella go blind. It come Salem to quality control, a guy brewing his own hooch could be using anything in it. Small vineyards have been found putting antifreeze in their wine...meth makers often cut their stuff with things like draino! Guy could be making shine in a lead bathtub for all you know...would you wanna drink that?