Here's why it works:
* Box of hair is inherently useless: A box of hair serves no practical purpose. It's just a collection of dead strands.
* Exaggeration: The humor comes from the extreme exaggeration. Implying you're less intelligent than something completely inanimate and useless is a way to highlight the perceived magnitude of your stupidity.
Essentially, it's a lighthearted way to admit to a lapse in judgment or a moment of sheer cluelessness.