Are earthquakes just for the sake of better game experience?
It's hard to prove a negative, but I believe that the earthquakes are only for flavor. I started a second playthrough on easy where I ran to the first collapsed hallway of the game as quickly as possible, and it was still collapsed. I also spent some time on the Legend of Grimrock forums and saw that other people had pretty much the same experience. I haven't seen a credible reported case of "Yeah, I was able to beat the earthquake and get through a tunnel before it collapsed!"
In short, the earthquakes that occur are semi-random in nature and don't seem to be tied to the collapsed hallways.
The other thing earthquakes also do is wake you up if you're sleeping. Other than that, they do not seem to impact gameplay.