Reinheitsgebot question

Like, if the only ingredients are allowed are barley, hops, yeast, and water, why do I see so many German wheat beers?

Also, what if someone in Germany wants to make a lambic or something? It it completely illegal to even make it (like the cops bust down your door if they see you brewing it), or can they just sell it as something that’s like, technically a non-beer, beer?

I didn’t know that there is only 1 set of ratios for the ingredients to make beer.

Obligatory Simpsons vid:

According to wiki, yeast wasn’t even part of the original 1516 version of the law. Coriander, bay leaf, wheat were allowed by the mid 1500’s.

The Duke of Bavaria made an exception.