Thank you for your question. I look forward to working with you to provide you the information you are seeking.
Zoning is considered a police power of the state, which can be exercised by each municipality. Thus, as long as the ordinance was properly passed by the municipality it is indeed legal and the fact that it is not strictly enforced would not make it unenforceable. When a government enacts laws they also have discretion in enforcement which would not be disturbed unless it is proven the law is being enforced based on some unlawfully discriminatory reason (age/race/sex/national origin/disability), since they hold enforcement of these ordinances discretionary to the government. What would make it not enforceable is if you can prove historical non-enforcement and their historical allowing you to engage in such rentals previously with their knowledge and non-enforcement, which you relied upon to your detriment and then you could argue that they are prevented by the equitable theory of laches from enforcing this against you now.
Thank you so much for using JustAnswer.com. I truly aim to please you as a customer, but please keep in mind that I do not know what you already know or don't know, or with what you need help, unless you tell me. If I did not answer the question you thought you were asking, please respond with the specific question you wanted answered. PLEASE use REPLY to EXPERT if you would like more information or if you feel something was not included in your answer.
Kindly remember the ONLY WAY experts receive any credit at all for spending time with customers is if you click on OK, GOOD or EXCELLENT SERVICE even though you have made a deposit or are a subscription customer. YOU MUST COMPLETE THE RATING FOR THE EXPERT TO RECEIVE ANY CREDIT, if not the site keeps your money on deposit.
Also remember, sometimes the law does not support what we want it to support, but that is not the fault of the person answering the question, so please be courteous.