Consumption of all drugs is legal in Germany. The problem is buying/selling/production, as well as simple possession. I think this is the case in most countries.
This tiny detail makes the difference why employer-mandated drug tests are not a thing in Germany like it is in the US.
Not really. The business of employer-mandated drug testing in the EU is generally tricky, and employees enjoy wide ranging protections. Most countries only allow drug testing where there is a certain aspect of risk, and in most of those case, only a physician can perform the test, and cannot share findings, only declare the subject as fit for duties or not.
In Germany, specifically, a pre-employment test but a physician is allowed, and when employed only rarely and for very specific circumstances.