Zoning and code enforcement don’t get to arbitrarily pass new regulations and ‘forget’ to notify people about them. Also, they are bound by more laws and the appeals process is entirely more fair.
Got a spare 200K to defend yourself against their lawyers?
Didn’t think so
At least the HOA puts all the rules down on paper
Code enforcement and a crooked DA can make up any law they want or enforce it anyway they want and who they want against. And it is perfectly legal.