Does OP refer to standard fantasy, or Dwarf Fortress in particular? Generic high fantasy draws heavily from Lord of the Rings, and Gimili always used his ax, thus modern generic high fantasy always have dwarfs with axes. High fantasy writers don't always seem to try to maximize internal consistency or logic, and thus I don't knoe of any that have noted the value of a phalanx inside of a tunnel.
In my forts I assign a mix of weapons to cover all the cases: hammers for breaking bones and crippling, axes for removing limbs, sword for stabbing and hacking, and spears for penetrating deeply in large creatures. As mentioned in another post, right now, the game doesn't have a REACH parameter/tag for weapons, so the spear/pike has no special combat value other than its ability to penetrate deeply. When the game does have a [REACH:min reach:max reach] token for weapons, that will be a major incentive using spears and it will allow for phalanxes and such. The other characteristic is the hybrid materials as someone else said. When this is in, it will mean that spears cost as much metal as a knife, making them excellently cost-efficient weapons.
I personally see a halberd with a hook on one side being the best tunnel weapon. Stick it forward to stop advances, use it as an ax up close, use the hook to trip and pull in enemies.