That is why it would be a good idea to have them do a mandatory check of the coop and setup, to make sure it is up to code and regulations, before adding chickens. Then they can make sure it is rat proof, and make anyone not up to code, get up to code, or no chickens.
Right but enforcing that is actually much harder and time consuming than some cities are ready to take on. That means hiring someone to do the inspections and keeping all of these records plus other costs associated with it. It will be ongoing work that'll need done as people start keeping chickens, drama when someone isn't keeping their birds up to code and the city would suffer due to more rats.
Generally when its a known inspection its scheduled and that means people clean up beforehand. So how they are really caring for the chickens isn't always what is shown in the inspection