Don't wonder. I'll tell you.
By far the majority of private residential estates here are what you choose to call 'gated'. It is not to protect the residents from marauding teens or fat, hirsute, ignorant, gun toting people from Phoenix. We do not have a gang culture as you do. We do not have a violent society like you do. We have one of the lowest serious crime rates in the world. (OK you can stop reading for a while and google the info). The reason we have 'gates' or 'barriers' is so that those of us with residents' access to the tennis and squash courts, the swimming pools and barbeque areas, the outside seating areas and the flower gardens, do not have to fight our way through crowds of people who would take advantage. We have membership cards to show that we have paid for our relative privacy and we have coded access to all buildings, from our own block to the club house, the saunas and the lounge areas and, of course the car parks.