As in many of life's encounters, few things are black / white or good / bad. HOAs, covenents and municipal codes were started for good intentions, but oftentimes get out of hand (just like the unintended consequences of congressional acts). As long as everyone is aware and understands the rules before buying, ideally there should be no problems. However, many rules, covenants and codes are poorly written or interpreted, which leads to neighbor conflict and court suits. I was there once and promised myself I would never again find myself in that situation. My B-I-L has spent $30K+ in legal costs and over 6 years in one such battle that ended in a compromise.
I now live in the country where the lots are 18-30 acres, and homes are about 100yds from each other, no HOA or codes. The good thing about living in a rural area is I can do anything I want on my own property - the bad thing is my neighbor can do anything he wants on his property. If I don't like what my neighbor does (like spray liquid pig manure on his fields), and polite conversation does not change it, my only recourse is to accept it anyway or move. This freedom comes with a price, but my wife and I accept that and would rather pay that price and take that risk than to live in an area that promises home value security through enforcement of restrictive codes. For a number of reasons, not everyone has that luxury however, and I feel for those of you dragged unwittingly into that morass.