You could view various non-proliferation agreements as a legislative constraint on military technology.
Same for chemical and biologicals. Those do prove your point that the law will be ignored if expedient. But it doesn't invalidate the notion of a society putting constraints on itself.