The purpose of the beach being public isn't really sunbathers. It's a very old principle based on the idea that the waters and the land under them belong to the public, and that they should be accessible to people doing the fundamental things that require access to the water: fishing, washing clothes, etc.