Upvote:2
There were two main reasons: consumer protection, and the availability of bread-making ingredients.
Consumer Protection
Quoting from The Telegraph,
Appropriately one of the key reasons for the introduction Reinheitsgebot to give the law its official German name was to protect beer consumers. Five hundred years ago water supplies were often polluted so people drank beer, often in vast quantities, to keep thirst at bay.
By ensuring beer contained only high-quality products the law protected the public from poor standard, and potentially lethal, beverages.
Also, Beer Stack Exchange says
In addition to what's been said, the original purpose of the order was to protect consumers from brewers who used problematic (toxic/psychoactive) herbs to preserve their beer, instead forcing them to use hops.
Bread Availability
From Wikipedia:
The Reinheitsgebot was introduced in part to prevent price competition with bakers for wheat and rye. The restriction of grains to barley was meant to ensure the availability of affordable bread, as the more valuable wheat and rye were reserved for use by bakers.
Also,
"It was created to free up the baking grains so that there was less competition with the bakers," Simpson said. "The bakers were up in arms because they felt the brewers were taking all the grains so the Reinheitsgebot restricted the grains that the brewers could use to malt, strictly malted barley."