It's all of the above...learning to swim, supervision, and layers of protection. We also have to get our collective selves out of our current M.O. Aquatic facilities either:
1) don't have (or don't desire to have) outreach programs to high risk populations
2) teach a loose version of "swimming" that nearly ignores proper form and true swimming ability- which are key in learning to swim. It does happen, but we hear of much fewer cases where the victim was even moderately proficient in at least two strokes over a distance
3) teach swimming technique, but little in the way of aquatic safety
4) may do the above, but don't address the supervision aspect and layers of protection with adults
This is a broad brush, and there are certainly many facilities that do all four very well. Of course funding & staffing are critical developing successful strategies to these. Funding and staffing that is in short supply these last few years.