While it’s not dandruff that smells bad, dandruff can cause odor. Dandruff is a result of a flaky scalp, one that’s dry and irritated.
When you start to scratch, the dryness along with the cracked areas from scratching create smells that are not so pleasant, causing a bit of a stench in the process.