Structures. They could be dungeons, or villages, or a random well. Structures can spawn anywhere, but some can only spawn in certain places.
Wells, bridges, those random stone platforms, and more can only spawn on the surface.
Some things, like the giant arches in the sandy areas, can only spawn underground.
Other things can spawn both above and under the ground! This includes villages, laboratories (Except for the Mobile Lab) and more!