As an example, Germany (as well as many other countries) requires that all SIM cards are registered to a real person:
However registration-free SIM cards are available in nearby countries and roaming within the EU is free of charge since June 2017, so anyone wishing to stay anonymous can easily do so. So what's the point of having restrictive laws within Germany itself? Can't any German criminals/terrorists/evil citizens get an anonymous SIM card from Poland or Czech Republic if they need to?