Awe, probably just an obscure hardware defect, they happen in manufacturing occasionally and it's good that you caught it, but at the same time it probably would've been covered under warranty. Sure it's a pain to have to go back to the store and get a replacement, but don't think too bad on Android, it's really something that could've squeezed by since they can't possibly test every feature of every phone before it leaves the factory.
And I'd be surprised if you ever hear of something that specific happening again, sounds totally random!