Residents often want to keep undesirables out of their neighborhoods. Decades ago there were all sorts of laws against vagrants and other undesirables. The police often exercised great latitude in decision making and enforcement. Those practices have been struck down. If you want undesirables off your streets and out of your communities, then you need to belong to a gated, private community. That means the streets are also privately owned, built, and maintained. The HOA can decide on all of the rules. That also means the HOA is responsible for enforcement. The police can enter to deal with major crimes but the community must handle other issues such as traffic control.