Illegal chemistry is also not feasible, but we can restrict availability to certain chemicals to try and prevent people from doing things likes like making bombs or turning their neighborhood radioactive while messing around. Of course some people will find a way but that doesn't mean the door has to be left completely open for anyone with a credit card to be able to order large amounts of high purity H2O2 for example.
I am not advocating for this particular issue, I am pointing out the flaw in your metaphor -- you can't restrict the math but unless people figure out how to make their own wafer fab then you can at least try to restrict the ability to do it.