the same reason you can build a sandwish tower but you cant build a tower with your cereal and milk.
Because one is liquid and the other is solid.
Also, caves are not even remotely as deep as the oceans. Not even close. Most of the underground caves that are below sea level are, unsurprisingly, filled with water.
Earth does compress things, but rock has a tensile strength and an elastic modulus value that needs to be overcome before it starts breaking down and fill cavitys. So down to a certain depth (pressure) it will be rigid and caves can exist if small enough, but further down we will find none.
And even further down, the earth itself is liquid due to the pressure. Rock, metal, everything becoems a liquid further down from the immense pressure.
Latest Answers