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.