Although we live on Earth and often take its resources for granted, it still continues to baffle scientists that Earth is the only planet in our solar system that is made up of 2/3 usable water. For what it's worth, we just can't figure out why it's here.
Theories suggest that before our solar system was formed, hydrogen and oxygen atoms, which our universe has a lot of, formed together to create space ice. These would later gravitate toward one another and create a large mass of water.
Our Sun would have also formed and ultimately evaporated anything close to it, while many of those molecules in the vicinity of where the Sun was formed may have even been destroyed in the massive chemical reaction in the middle of space.
There are other bodies in space with water on them, but the amounts have been relatively small, or are frozen, and the conditions are nothing like here on Earth, where life has been able to form.
So where did that glorious water come from? Who knows, but the beaches Earth has to offer sure are nice!