Here's why:
* Limestone: This is the most common rock type for cave formation. Limestone is made up of calcium carbonate, which is easily dissolved by slightly acidic water. This dissolving process, called karst, creates cavities and eventually caves.
* Dolomite: Similar to limestone, dolomite is also composed of calcium magnesium carbonate. It also dissolves in acidic water, albeit at a slower rate than limestone.
* Gypsum: This rock is composed of calcium sulfate and is especially susceptible to dissolution by slightly acidic water. Gypsum caves are often found in arid regions.
Other rock types can also form caves, but they are less common:
* Lava caves: These are formed by flowing lava, where the outer surface cools and solidifies while the molten lava inside continues to flow.
* Sandstone caves: While less common than limestone caves, sandstone caves can form through erosion by wind and water.
* Glacial caves: These are formed by glacial erosion, where the ice melts and creates cavities in the surrounding rock.
So, while there are other types of caves, most caves are formed in sedimentary rocks, especially limestone.