With the way that offenders tend to get mangled by the hammerer and spend a very long time in the prison bed recovering from their wounds ( in some cases laying there forever* ), one stint of sufficient unhappiness (maybe a less general trend, like a couple with many children both being killed) could lead to that 1/10 getting filled up.
It's not so much an everyday consideration as a contingency estimate.
How many times have you used your house's fire extinguisher or been saved by the smoke detector? Similar principle behind the cell count, I think.
I make my prisons opulent dens of wealth and excess, too. I figure their point is as much, if not more, about rehabilitation as about punishment. My dwarves don't intimidate their kind into obediance with the threat of long painful time spent in horrible prisons. Instead, they reprimand offenders for their behavior ( by arresting them and/or hammering them ) and then focus on bringing that offender's mind into a state where they can be peaceful and useful again after their release.
Dwarven justice, naturally, should different from, and more effective than, human justice.
* - I once had a failed mandate result in a hammering for a fort's legendary armorer, giving him a nasty red leg wound. He was the only armorer I had trained to any level of skill, since I tend to specialize armorers and weaponsmiths to make sure they get to legendary even without a mood. He wound up laying in a prison bed with that red leg trying to heal for 10 years while I had adamantine wafers waiting for his recovery. I eventually gave in and used Dwarf Companion to heal him. A broken leg that bad either throws a clot/marrow early on and kills someone, gets amputated, or leaves them a mobile cripple. It never lays them up for a decade entirely immobile. The healthcare update and setting breaks alone has me glowing with relieved excitement.