Because it's easier to get it through the courts.
This is pretty much correct. When I had to rewrite our protests and parades ordinance, we banned a long list of objects that could be used as weapons, from billiard balls, to shields, to thick flagstaffs, to waterguns and water balloons filled with piss, to even simulated or toy guns, but because of constitutional issues we did not ban guns.
In our weapons code carrying nunchucks and ninja throwing stars on the bus is banned but not guns (and I removed the ban on switchblades since those are legal now).
Basically, its a way to do something since there is a gun lobby who sues but not really a mele weapons lobby who does the same. The Supreme Court did rule in Caetano that the 2nd amendment applies to weapons other than guns, but there is very little case law as to what that means as far as the 2nd amendment.