That's right. Reinheitsgebot. Otherwise known as the "German Purity Law" In 1487, Albert IV, the Duke of Balvaria, introduced a law that limited the ingredients of beer to hops, water, and barley. Twenty-eight years later, two neighboring dukes adopted the law in their areas and added a standardized price per liter. The law was amended in the 18th century after Louis Pasteur discovered that yeast were responsible for the conversion of sugar in to alcohol. After standing for 501 years, the law was lifted in 1988.
The intend of the law was two fold. First, it standardized hops as the preserving agent in beer. Hops posses antibacterial properties that favor brewer's yeast (which is a fungus) over beer spoiling bacteria. At the time the Reinheitsgebot was enacted, brewers were using everything from psycho-active plants to soot from fires to preserve beer.
The second intent of the law was to reduce the demand for rye and wheat. By limiting the brewers to barley, the bakers were free to using rye and wheat in bread. The law, however, did not stop some royalty from drinking their hefeweizens. The Dukes of Wittelsbach gave one brewery the exclusive rights to make a wheat beer. A brewery would have to pay for the license to brew the beer, but were the exclusive provider of the style.
The beer industry today doesn't follow the Reinheitsgebot. The largest brands use corn and rice to provide fermentable sugars instead of barley, and the smallest brands are adding increasingly esoteric ingredients to stand out (I'm still waiting for a durian fruit beer). It has become more of a market gimmick, and tries to dupe the consumer into a perception of quality.