It's also possible that the mines began as part of a large natural system of caverns, and thus would have had much less unwanted material to dispose of. Though Dwarves considering almost any kind of rock or metal "unwanted" seems a bit out of character. I would suspect that they traded them with Elves and Men who wanted building materials for stone structures or monuments or such for foods they could not obtain or grow underground. One doesn't hear a lot about Dwarven farmers, after all.