There has to be a good reason to go to all the trouble of making moonshine. Actually, there have been several reasons, but they all boil down to one thing: government control of the alcohol trade.
Moonshining began very early in American history. Shortly after the Revolution, the United States found itself struggling to pay for the expense of fighting a long war. The solution was to place a federal tax on liquors and spirits. The American people, who had just fought a war to get out from under oppressive British taxes (among other purposes), were not particularly pleased. So they decided to just keep on making their own whisky, completely ignoring the federal tax.
For these early moonshiners, making and selling alcohol wasn't a hobby or a way to make extra cash -- it was how they survived. Farmers could survive a bad year by turning their corn into profitable whisky, and the extra income made a harsh frontier existence almost bearable. To them, paying the tax meant they wouldn't be able to feed their families. Federal agents (called "Revenuers") were attacked when they came around to collect the tax, and several were tarred and feathered.
All this resentment finally exploded in 1794, when several hundred angry citizens took over the city Pittsburgh, Pennsylvania. President George Washington called for a gathering of militiamen under federal authority. Thirteen-thousand troops dispersed the mob and captured its leaders. This Whisky Rebellion was the first major test of federal authority for the young government.
Despite the failure of the rebellion, moonshining continued throughout the United States, especially in Kentucky, Virginia, the Carolinas and other southern states. Excise taxes on alcohol didn't go away, so moonshiners always had incentive to avoid the law. Gun fights between moonshiners and revenuers became the stuff of legend.
These battles escalated in the 1860s as the government tried to collect on the excise tax to fund the Civil War. Moonshiners and Ku Klux Klansmen joined forces, and many pitched battles were fought. The tactics of the moonshiners grew more desperate and brutal, intimidating locals who might give away the locations of stills and attacking IRS officials and their families. The tide of public sentiment began to turn against the moonshiners. The temperance movement, which sought to ban alcohol, gathered steam as the United States headed into the 20th century.
In the early 1900s, states began passing laws that banned alcohol sales and consumption. In 1920, nationwide Prohibition went into effect. It was the greatest thing the moonshiners could have asked for.
Suddenly, there was no legal alcohol available. The demand for moonshine shot up like a rocket. Moonshiners couldn't keep up with the demand, which led to cheaper, sugar-based moonshine, as well as watered-down moonshine. The distillers would do anything to increase their profit. Organized crime blossomed as speakeasies opened in every city -- these secret saloons had hidden doors, passwords and escape routes in case the "Feds" ever showed up to conduct a raid.
When Prohibition was repealed in 1933, the market for moonshine grew thin. Although moonshine continued to be a problem for federal authorities into the 1960s and '70s, today, very few illegal alcohol cases are heard in the courts. Large commercial distilleries can buy raw materials on such a large scale that, even with the taxes they must pay, their products aren't too much more expensive than moonshine. While some counties in the south and midwest United States remained "dry" (alcohol-free) for decades after the end of national Prohibition, even those localized liquor bans have, for the most part, faded away. That leaves consumers of alcohol little reason to seek out moonshine other than the temptation of buying and drinking something that's "forbidden" and the flouting of government authority. The desire to flout government authority is one of the reasons moonshining exists in the first place.