It's not true that areas unsafe for swimming are not marked - they are; moreover, there's both infrastructure in place to increase safety (e.g. lifeguards) and a significant amount of effort put towards educating people about the dangers of things like jumping into the water in a potentially unsafe place.
But that's all beside the point. Laws and rules do not exist in vacuum, and humans are not spherical cows of uniform density. Time and again history has proven that most people can handle exposure to water safely, while they can't handle being exposed to hard drugs. You can blame this on individual stupidity, but people don't have perfectly free will, and if this stupidity predictably touches big fractions of a population, it's time to mitigate it.