I had this problem too, it has to do with the quality of the wires. When one of the wire's linings gets damaged, the signals get disrputed and cause issues with how you hear them, usually it's not completely noticable visually, but a slit usually forms somewhere on a single side of the wire (which if you bend it in a specific direction can cover it up if it isn't to big).
Typically more expensive (not really pricewise, but basically anything more than $15) headphones tend to last longer than $9 ones, or at least that's been the case for me, but it mostly has to do with how often you handle it and how often you leave it somewhere where it ends up squished by an electronic device, stepped on, yanked out, etc.