My new apartment has a tall, gated fence around the swimming pool - here in California, most of them do.
Of course, parents and caregivers should always watch their children, but, in reality, people get distracted, and accidents happen.