I never heard of an HOA that wasn’t mandatory. In every situation I’ve been involved with, the HOA “membership” is written into the property title and can’t be changed unilaterally by the property owner.
In a rural area, this sort of "voluntary HOA" doesn't go as far as having CC&Rs filed for recording.