Weapon rack is an item of furniture which can be used to create a barracks or to appease a noble's demand or raise the value of a room.
In theory, when used in a barracks designated for Individual Equipment storage, dwarves will prefer to store their weapons on the racks instead of stockpiles. Doing so in concert with armor stands would allow you to create centralized armories for your military. Unfortunately this doesn't work due to a bug.