I used to think the same until I got my first set of 300$ headphones (QC 35). There is very real difference between those and any 30$ earbuds. You hear the music in a very different way.
Price doesn't necessarily correspond to audio quality very well. For example, Ultrasone sells some objectively terrible headphones for $3000.