You probably have not noticed, but all underground structures do not go down to Y:1. They go down to Y:2. Caves and ravines have uncut stone blocks at the second last layer (along with all of the bedrock, Abandoned Mineshafts appear to go no lower than Y:2 and Strongholds generate to Y:3 (mining the floor will bring you to Y:2). Is this a bug, or is it to prevent dungrons from allowing access to the void.
Steps to reproduce:
1. Go into Spectator mode.
2. Look for bedrock caves.
3. Look around and use debug to know what layet the most bottom part is. You will realise that you cannot find a floor of a lava lake on top of the last layer.
Comments 6
No, I meant they should go down to the layer that only has bedrock, the second last layer has some stone.
And no, it's on any world. I put a steps to reproduce section, because it would be very hard to prove that they don't cut through the second last layer with screenshots. All I'm saying is that the reason for underground structures to not cut through the second last layer is unknown to everyone but Mojang. For example, have you ever seen an abandoned mineshaft cut through the second last layer but not the last? Well, it's obvious it shouldn't cut through the bottom layer or the void would be accessible.
This might also apply to caves in The Nether.