There was also the concept of making executions as torturous as humanly possible.
Crucifixion is just about the perfect execution in terms of prolonged death. With those who die of it tending to die of suffication. I could go into the science involved but suffice it to say... it was pretty bad.
Hammering is gruesome, but since the first blow of a hammer to the head should be instant death, it is not really torturous
Assuming that the goal is to strike the head.
Though to be fair if Hammering was a REAL execution method it is likely favored for being a flexible system.
Someone sentenced to two hammerings? Well you could hit their head and pretty much guarantee their death...
Or you could crush their legs... or their hands... intentionally and spare them at a high cost... One could also give people who had TONS of hammerings basically a torturous excruciating death... or just one to their head to kill them instantly.
As well surviving hammering as a justification for allowing you to live is also something that likely would be built right into the system... a trial by fire sort of deal.
It could be as cruel or as kind as the dwarves need it to be... and frankly I don't believe Dwarves are super humane... They just dislike concepts they believe are "underhanded" or "Needlessly cruel". The idea of fair play is bred into them.