Not to be confused with Laws have no effect
This phrase is often (in my experience) used to suggest that no matter how bad things may seem, trying to fix them by changing the government's official position is pointless.
It is very true that no one agency can change anything of importance, but the government is a good agency to have on the side of the good guys. Whoever the good guys may be.
And while there are some people who don't follow the law, you probably have fewer people doing whatever-it-is than you would if you had passed no law at all. (If these are good laws, then) this causes more good to be done, and thus it is better than nothing.
Banning alcohol didn't work.
Banning drugs probably won't work.
Banning polygamy worked really well.
Banning slavery worked well, but it wasn't easy.
Banning guns looks like a piece of cake in comparison to drugs and alcohol.
The moral? Um... Well, there isn't one. Except, you never know what you can ban, until you try.