Digging out a ton of rock and earth is a lot more complicated IRL than it is in games like Dwarf Fortress or Minecraft. Real life geology is pretty complicated, you gotta deal with shit like ground water, unstable types of earth, blasting. It's all pretty expensive and dangerous. Meanwhile humans have gotten pretty good at erecting shit above ground, we can throw up sheds and huts like nobodies business.
Edit: Also plumbing, electrical, HVAC, means of egress and sewage become problems with subterranean development. Digging a room underground, doable, but then you're gonna have to dig out additional shit to get all the water pipes and air ducts in there. Also, people like having windows, and windows are good for fire safety, but it's kind of hard to put enough windows in if only one side of a dwelling is facing the open land.