I assure you there are plenty of people who think that loud noises, odors and "unsightly projects" are an issue even if no money changes hands. These people have far less leverage over tenants than they do over property owners so they seek to ban tenants
The zoning you speak of is enforceable enough. It doesn't need to be enforceable 100%, just enough to make the risk/reward not worth it. Remember, a large part of the busybodies motivation is "neighborhood character" (or some other shit like that). They don't care if you break the rules so long as you do so in a way they find agreeable. They want the power of arbitrary enforcement so they can screw you if you have tenants that throw loud parties (or whatever). It just so happens that it's easier to get draconian punishments attached to the zoning code than it is to get them attached to the petty crap the busybodies care about so they get rough proxies for the stuff they care about prohibited via the zoning code.
What leverage do they have over a property owner?
No way. Depending on the town, you'll either piss someone off, or a busybody will rat you out to the codes compliance people. Once that happens, they'll investigate and you're done.
When they figure out that you have guests, it's closed and the complainer is directed to do a noise complaint. If they figure out it's a business, you get cited.
For most of HN that is true because most of HN lives in wealthy cities or suburbs that have enough tax income that they can have a big enough government to the point where spending man hours chasing down that kind of stuff is important. Poor cities don't have the resources to go investigate busybody crap.
Regardless I think the gp makes valid point against the ggp. It's definitely not "unenforceable".
They still managed to give my neighbor a $150 ticket for parking his commercial vehicle (Verizon Ford Taurus) in his driveway.
Actually, I think that is the whole problem. Many of these regulations exist because the local government officials want to extract as much value as they can for themselves and their friends.