Yes it's important to remember that lifeguards can't see everything happening in a pool, or at the beach, all the time.

FWIW, here in Toronto during freediving underwater swims (dynamic apnea) the trainee/competitor swims in the leftmost or rightmost lane of the pool and one person walks along the edge of the pool watching them, while another person swims along the surface in the next lane over watching them. This way they can react instantly if something goes wrong.