Ok, so I just woke up so bear with me.
Quality, weapon material, preferences of both material and weapon, and possibly value and training, since I know value affects armor selection. If a dwarf say like shortswords (and discounting training for this example,) they'll grab a shortsword of the best material and quality first. So if there's a ludicrously decorated/valuable sword made from say bronze and an undecorated steel one (for our needs let's say they're of equal value, the bronze one via decoration,) they'll likely go for the steel one simply because it's of a better material, however if there's a sword made from a material they like, such as iron, they'll be more inclined to take the iron shortsword because they like iron and they like shortswords.
Same goes for say a hammer. While silver may be considered best to us players for its density, a dwarf won't think so because it's an inferior weapon material despite its value unless there's no better alternative, unless possibly, they like silver then they'll be more inclined to use a silver hammer. This may also lead to a dwarf picking an adamantine hammer simply because it is technically the better weapon material, though why anyone would have admantine hammers laying around is beyond me.
Of course this can also lead to stupidity such as dwarves grabbing crossbows simply because they like them for a melee, or assuming training influences choice regardless of preferences hammerdwarves may grab up the crossbows since they're governed by the hammer skill in melee if there's too few hammers to go around. Yes this happened, and yes the idiots who did this ended up dead and deserved it. I noticed the problem after three dead soldiers in my early days and started to better learn the military interface. Maybe that's not the case anymore, moving on.
There's also not getting a weapon at all. There's those dwarves who like "foreign" gear that they may not be able to equip because the weapons are too big like 2 handers, halberds, and pikes, since I've had dwarves with such weapon likes go into battle unarmed when left to individual choice and there being plenty of other weapons laying around in the armory or they'd simply rather fight with their hands or just a shield.