I would bet that either the broken bar had been installed previously on a different bike, or there was some major problem with the metal. Did you look closely at the metal at the break?
Even an el-cheapo bar is going to have a predictable lifetime that exceeds your one month. I've had a MTB bar get loose, then come off in my hand. It was a cheap one, and had suffered many crashes, and hundreds of jumps. I accelerate from a stop sign, pulling up, and whee! Later inspection showed the crack had progressed from the underside and had been doing so for a while. Half of the break was dull grey aluminum.
My strategy has since been: it's okay to buy cheap bars as long as you replace at reasonable intervals. But I'm tempted to take a close look at all my bars after hearing your story.