Flynna Jones, writing in the International Business Times, explains that HOA rules are necessary because HOA rules
Yeah, you read that right. "For many decades, HOAs were used to keep African-Americans and other minorities from buying suburban housing. The Supreme Court declared them unenforceable in 1948, but they remain on the books of many an HOA to this day." According to McKenzie, "The original reason for all HOAs was to enforce race-restrictive covenants."
A small sample of race-restrictive covenants can be found at http://depts.washington.edu/civilr/covenants.htm