But to buy that home/land from the previous owner you have to sign a contract stating you can't leave the HOA and that when you sell you only sell to those who will join the HOA and contract.
This goes back to the construction company/realtor investing to build the entire suburb and putting down the roads and such.