You’re referring to the “rheinheitsgebot” or beer purity law, of course, of 16 something.
Actually it stated that beer could only contain barley, hops, and water.
Yeast hadn’t been “discovered” yet, but was included later once it was isolated. Wheat beer got a pass, simply because it’s so danged good I’d wager. It still contains about 50 per cent barley, though. In fact I prefer it, mostly.