The court's duty is to interpret the ordinance. They could have interpreted the ordinance in line with the clear intent of the Yuma City Council, i.e., to deal only with those activities that would trigger the Arizona law. (Laws can use different words to say the same thing, particularly when they are drafted by entirely separate legislatures.) Or they could have come up with an unreasonable interpretation that was clearly not the intent of the Yuma City Council and strike the law down. They chose the latter, and provided no rationale for that decision.
Probable intent is not the same as clear intent. Nor is the ordinance that was written the same as what you see as the clear intent of the law. If Arizona had decided that churches no longer triggered a liquor-license exclusion, the Yuma ordinance would have still excluded churches. If Arizona added strip-clubs to the list of what would have generated a liquor license exclusion zone, then the ordinance wouldn't have limited them. (Don't laugh, strip clubs are often subject to restrictions on alcohol licensing and vice versa.)
I'd much rather have courts deal with the actual wording of the law rather than trying to second guess legislative intent.