Do you have to put containers or cabinets in a dormitory?

Solution 1:

Nope but good quality ones act as room enhancers. Its like placing ≡statues≡ in your meeting hall.

Solution 2:

On a purely technical level, the only furniture needed in a dormitory is the bed to define it. Anything else, including the door, are optional.

On a more useful level, cabinets will be filled with clothes, so yes they are useful; containers (bags, chests and coffers) are not used at all in dormitories - you can build them, of course, but no dwarf will ever put an item in them. Incidentally, this is the polar opposite of hospital behaviour, where containers hold everything and cabinets are ignored.

As a final note, cabinets in dormitories may cause the game to not release the resident dwarves' hold on their worn out clothing. This was certainly the case in 0.34 and 0.42, where deconstructing cabinets resulted in a sudden massive amount of unowned xsocksx and so on, which could be dumped in an atom smasher -- or sold to traders, because even with the price penalty from being worn, clothing is absurdly valuable in DF.