There is nothing legal about an HOA or Administration providing the equivalent of $50 USD worth of security service and charging $200 USD simply because the elderly in these communities are easy prey or foreigners who don't know that difference between a $50 security service and a $200 security service.
Your math is way off. The monthly HOA fee is not only for "Security".
The HOA fee in a gated community funds the garbage pick up, road maintenance, common area maintenance, water delivery, common area lights, landscaping of common areas, administration, security and more. It takes money to do all those things. Sure, the developer makes a profit on the sale of a house, but the cost of maintaining a gated community goes on forever. An HOA fee covers those costs that go on forever. It's perfectly legal and justified. But you want it provided for free?
I have a house in a small US town. I pay taxes. Guess what those taxes pay for? Garbage pick up, road lighting, administration, parks, water delivery, and police. Just like a gated community, right?