Legality and enforcement are orthogonal concepts. They should align, but sometimes they don't and you get an unenforced law.
Obviously, less people's behavior will be changed if there are no consequences to doing the illegal thing.
Gun control implies the need for enforcement, because you need to act on something in some way to control it. A piece of paper with some words on it (which is what an unenforced law is) can't act on people by itself.