A few reasons...
1. If Apple chose to match the color of the headphones to the device, then they would need to do that with their iPods as well, and most people probably don't want lime green headphones to match their lime-green iPod. If you want black headphones, buy a pair from any one of the hundreds of headphone makers.
2. Apple chose white for their earbuds back when they first shipped and designed them. At the time, it was unheard of and really made them stand out. It is now one of their most over-looked and iconic designs they have ever done. They are Apple's signature designs and most recognizable features. You see someone with white earbuds and chances are they are using an Apple product.
3. Despite what many say, Apple has a degree of planned obsolescence in their designs. The iPod touch's chrome back that instantly became scratched the moment you took it out of the package, the glass back on the iPhone 4, the scratchable black coating on the iPhone 5. All of these were conscious decisions to make you feel as though your device is old and outdated. The white cords do the same, after a few weeks use, they become dirty and draw attention to the age of your device and unconsciously make you want to update them.