Answer:
One possible way is that the Earth held onto some water when it formed, as there would have been ice in the nebula of gas and dust (called the proto-solar nebula) that eventually formed the sun and the planets about 4.5 billion years ago. Another possible way is that some of that water has remained with the Earth, and might be recycled through the planet's mantle layer. I believe the proto-solar nebula is the most reasonable way since the features of all planets are brought by the elements that formed them; in this case, it was the nebula of gas and dust.
Step-by-step explanation:
Hopefully this helped! :)