The Dwarves of the Hornrim Mountains were secluded for the vast majority of their lives, only ever leaving the mountains to gather food, only to grow it within their cave systems. However, as humans encroached closer to their range, they began to learn more about human society- namely, the perceived differences between human men and women. From what they saw, the women stayed behind and cooked, and the men left to fight.
From then on, every dwarf in the Hornrim Mountains was male. Not that there were any perceptible differences between their sexes in the first place.