That's different. They cant create new "laws", and they can't spy on you etc. Also that's just for one building usually (the building where you live in) not a whole community
HOAs can't create laws. They can create rules that are contract bound, but not anything criminal or physical based enforcement. (Taking away someone's home is civil)