You may be thinking of the time you snuck into the ocean water after lifeguard hours, or reached the edge of the beach not visible from the lifeguards. The indoctrination of having to abide by the rules is so strong, people are generally obedient and do not step over the lines.
This BBC article is very interesting, also brings up the myth that the spirits are uneasy when you go into the water after Obon, the festival appeasing the dead. It is true, that jelly fish roam the warm shallow waters during the end of summer, stinging anything in the way, and if the spirits are in the form of jelly fish, that myth will certainly be true.
- Yumi Zaic