Apart from code / AHJ issues, this is also a matter that greatly affects your ability to get homeowners' insurance. Lack the alarms or barriers, and you'll find fewer carriers, higher rates, and more exclusions.
(I just got my hands on some 'insider' info that is proving to be a real eye-opener on this topic!)
Remember, we don't simply follow the NEC, to the exclusion of all others. There actuall exists a 'Swimming Pool Code,' which is broadly adopted by communities. In essence, the pool needs both physical barriers to entry as well as alarms to indicate when the barrier is breached (say, by a gate opening).