Its more remarkable than you might think...that Earth has dry land.
When a planet forms the heavy stuff sinks to the core and the lighter stuff floats to the surface.
The heavy iron and nickel fill up the core and the mantle. The light colored and lightweight rocks (made of silicon and aluminum) form a skin at the surface of the planet. Logically than water should settle on top of that outer crust. And then the gaseous atmosphere should float on top of the water. So Earth "should" be a "water world". All ocean covering light weight rocks covering heavier rocks.
But in fact the earth's surface is two thirds oceanic crust with heavy dark elements right at the surface. And the light wieght rocks poke above the water to form the continents (most dry land, but with inundated continental shelves). Both sea surface and land are crowned by the atmosphere. So the layering of the earth is mostly, but not totally, logical.
Much of the continental crust seems to have been torn off. And then water filled the gaps and became oceans. Some say that the torn off part of the crust became the Moon.